Dynamic marker icons for Leaflet

Events happening in the community are now at Drupal community events on www.drupal.org.
kartagis's picture

Hi,

I have a situation where I need to display content with different terms on a Leaflet map. These terms also are associated with images. At this point, I would like to ask you whether the below can be done.

1) Multiple layers: To show different images, I might need to have multiple layers. Is this possible?
2) Dynamic icons: Is this possible, either with token or something else?

Regards,
K.

Comments

IP Geolocation Views & Maps

rdeboer's picture

Have a look at the IP Geolocation Views and Maps project page and all the references on it.
Then, if that doesn't suit your needs, ask here for more!
Dynamic icons: http://flink.com.au/ramblings/spruce-your-map-markers-font-icons
Rik

Dynamic Icons with Leaflet.awesome-markers

markaspot's picture

There is a nice implementation called Leaflet.awesome-markers. You can easily plug this into a Leaflet map and retrieve colors and icons as taxonomy fields. If you need some inspiration check out the Mark-a-Spot project page.

@RdeBoer: I've installed

kartagis's picture

@RdeBoer: I've installed ip_geoloc, changed the map type to Map (Leaflet API, via IPGV&M), but I think that requires lat/lon because I get an error informing me of that.

@markaspot: How do I plug that? Sorry I'm new to this mapping stuff.

Regards,
K.

I was finally able to do it.

kartagis's picture

I was finally able to do it. All I had to do was set /sites/example.com/files/[node:field_type] for point icon in map settings, then rename the icon accordingly.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: