I'm trying to do some customization of the GeoField module and running into issues. So far, it's the only module that we can actually get to work with Views, FacetAPI, and Search API so that's pretty neat! (Thanks for that) However, we are trying to do custom markers based on the content type of the nodes and we are running into some trouble.

I've experimented a bit with the geofield_map_plugin_style_map.inc file a bit in the geofield_map module and have included the content type in the $data object. However, I have no idea what to do with the javascript files in the map to actually do custom markers based on the content type.

I wondered if anyone had attempted this or if they had any suggestions on where to look? I have the information that I need to determine the content type of a Point, I'm just not sure what to do to actually render our the Point with a different marker.

Any help would be appreciated. Thanks!

Comments

alex.a’s picture

I did this using the leaflet and token modules.
Use a view of type "Leaflet Map", specify your own icon pointer url and include a token for the content type in the url.
The icon url looks something like this:
http://example.com/markers/[node:content-type:machine-name].png