Open pgrayove-mcpl opened 1 year ago
I'm using Leaflet, not Google Maps, but I think the problem and fix could be the same. See PR at https://github.com/backdrop-contrib/ip_geoloc/pull/9
I noticed that the previous fix only addresses simple cases, there are two more cases when location differentiator and associated markers are not saved:
I will provide a PR.
@pgrayove-mcpl Any chance you're interested in testing this one? https://github.com/backdrop-contrib/ip_geoloc/pull/15
I can test it out. Might not get to it until tomorrow.
@laryn I am still seeing an issue. I have a taxonomy for bookmobile/van stops which can be either Library Building, Van Stop, or Bookmobile Stop. I tried to set these as the marker differentiators and the view saved the style/colors I chose, but did not save the bookmobile/van stop value as you can see in this screenshot. Let me know if there's any additional info I can provide.
@pgrayove-mcpl Is this a View on a content type with a single-value Term Reference field or any other configuration? I also noticed that one has to add the map attachment, save the View, and only then you can add and save the marker associations. For some reason, the marker associations are saved in the configuration of the module, not of the View. Can you check, what is saved in your ip_geoloc.settings.json file under ipgeoloc{your_view_name}_color_mappings?
@AlexHoebart-ICPDR The map is built from a content type with an entity reference for the marker. I do have the map saved as a display in the view. I already had a map set up in the views and then just switched it to using ip_geoloc for the marker associations. The marker associations are being saved in the configuration module, but they aren't displaying on the map itself. Here's what I've got in the ip_geoloc.settings.json file:
"ip_geoloc_clone_of_bookmobile_stops_new_color_mappings": { "page_4": { "field_bookmobile_van_stop": [ { "differentiator_value": [ "27582" ], "color": "green", "special char": "", "special char class": "" }, { "differentiator_value": [ "27584" ], "color": "LFL-icon", "special char": "", "special char class": "" }, { "differentiator_value": [ "27583" ], "color": "gray", "special char": "", "special char class": "" } ] } } }
When I view the map though, all I see are green makers for everything. There aren't actually any van stops included in this map, but there should be 3 library buildings showing up as gray markers and they are all using the default green markers.
In the views format Map (Google API, via IPGV&M) settings, the location differentiator marker settings will not save. You can see and select markers that are in the marker directory, but the settings do not save and only the default marker displays on the map.
This notice displays when selecting a location differentiator:
Notice: Array to string conversion in backdrop_attributes() (line 2835 of /app/core/includes/common.inc).