umap icon indicating copy to clipboard operation
umap copied to clipboard

Custom Icon

Open yohanboniface opened this issue 11 years ago • 3 comments
trafficstars

Originally reported by: Badita Florin (BitBucket: baditaflorin, GitHub: baditaflorin)


Now we only have 4 types of icon that we can show in uMap, and from the 4 only 2 of them are able to host a image. ( Default and Circle )

One neat thing that we could do is to allow the use of Custom Icons, that would allow the shape to be in any form possible, similar to google mapsengine

http://www.shareable.net/blog/we-gathered-we-mapped-we-shared-a-mapjam-follow-up

We have the code for Symbol of the Icon, maybe we can elevate and allow the symbol to be showed, even without the default icon being placed.

One possible implementation for the icon it would be to have svg images, that the symbol of the icon does not support, or simple png, and the transparency would be get from the png.

And also maybe to allow some automatic code, as we see in the Symbol of the icon

You can use feature properties as variables: ex.: with "http://myserver.org/images/{name}.png", the {name} variable will be replaced by the "name" value of each markers.

but not for name, but for type , because, if we think as osm POI , the name will be changed a lot, but if we want to show all shops with a icon, all supermarkets with another, then we need to parse the type of poi

You can use feature properties as variables: ex.: with "http://myserver.org/images/{type}.png", the {type} variable will be replaced by the "name" value of each markers.

i see here a little trickier because it have to be a 2 steps approach, because osm does not have a type tag, it have 4 different tags

shop=* amenity=* tourism=* leisure=*

But this can be written in a function to parse it somehow


  • Bitbucket: https://bitbucket.org/yohanboniface/umap/issue/125

yohanboniface avatar Oct 03 '14 19:10 yohanboniface

Original comment by Yohan Boniface (BitBucket: yohanboniface, GitHub: yohanboniface):


A icon without shape, i.e. only displaying the image, is somewhere in the todo list.

I understand your concerns about OSM data being complex, but I'm not sure uMap should go to much in trying to hide that. Too much edge cases I'm afraid. I will think about it, though.

yohanboniface avatar Oct 03 '14 21:10 yohanboniface

Original comment by BitBucket: bibi56, GitHub: bibi56:


if we could get the value from OSM, it should be fine. "http://myserver.org/images/{shop}.png" "http://myserver.org/images/{amenity}{cuisine}.png" (or OSM:amenity...). If it's a Free marker template, then default value could be given if absent.

yohanboniface avatar May 20 '15 16:05 yohanboniface

any updates on this since 2016? the functionality has already been implemented?

annalisapg avatar Sep 14 '21 09:09 annalisapg

Just commenting to express interest in this request, I was just searching for how to do this because I wanted this as an icon on my map, https://www.iconarchive.com/show/material-icons-by-pictogrammers/pokemon-go-icon.html I see now it's not currently possible.

fortepc avatar May 29 '23 06:05 fortepc