New home › Forums › Pro Add-on › General queries › Looking for a way to maintain markers in a central place
- This topic has 8 replies, 2 voices, and was last updated 2 years, 1 month ago by Steven.
-
AuthorPosts
-
July 12, 2021 at 6:11 pm #69812zodiac1978Member
Hi there,
we are using the Pro version in our agency for a client. It is a fitness center franchise company, so we have more than one site (for the bigger European countries) but we want to show each fitness center from each country. Synchronizing those markers is a time consuming task, so we are looking for a way to optimize this.
Is there a way to have a centralized file which is just read from the other installations?
I tried to use the XML file as source, but it seems I can’t choose a source outside of the /wp-content context as the source.
If I choose a KML as source I don’t know how to maintain the file as I have no UI for adding the markers.
Could this be a solution? Maintaining a KML file with a Third-Party-Software and use this as a source for the markers?
Any help is much appreciated!
July 13, 2021 at 3:24 pm #69821StevenModeratorHi there,
Thank you so much for getting in touch, we really appreciate your time.
Unfortunately, each installation will require a copy of the map data in the website directory and within the database in order to load correctly on the map.
With regard to the KML option, might I suggest perhaps looking into using Google My Maps?
– https://www.google.com/maps/d/This should allow you some customisation to your maps which you can then download as KML file, and replace?
Kindly let me know if this helps?
Kindest Regards,
StevenJuly 14, 2021 at 11:25 am #69840zodiac1978MemberHi Steven,
that’s a great hint with “Google My Maps” and exporting the KML file works great. Although it is one step more to do.
Google is also providing a dynamic KML file (network link). This file only contains the name of the file and a link. Copying this link from the exported file does download the correct KML file directly from Google:
https://www.google.com/maps/d/kml?forcekml=1&mid=[key]Unfortunately this link does not work within WP Google Maps Pro.
Any idea why this does not work? This would be very helpful for us. The we could add/edit/delete our markers on “Google My Maps” and just use the KML file on all installations as source to keep them up-to-date everywhere.
I am unsure if this is a limitation from the plugin or from Google …
Hoping that this can be fixed on your side (or maybe it is just a problem on my side).
Any insights are much welcome!
All the best
TorstenJuly 15, 2021 at 4:19 pm #69878zodiac1978MemberIt works! I just need to upload the network KML file which links to the KML data and put a link to this file in the plugin settings. Now the markers are shown.
Now I just need to find out how to customize the icon. It seems that the icon from Google My Maps is not used in the KML (at least the change does not show).
July 16, 2021 at 7:27 am #69896StevenModeratorHi @zodiac1978,
Thank you so much for getting back to me and my apologies for the delay.
I am glad to hear you got this working.
Unfortunately, custom icons can prove slightly tricky to get correct. Perhaps the following StackOverflow might help with the KML data in order to assist with custom icons:
– https://stackoverflow.com/questions/5492211/custom-icons-in-kml-not-showing-up-on-google-maps-api-v3It seems there may be a few steps in between in order to load custom icons correctly.
Kindest Regards,
Steven De BeerJuly 16, 2021 at 8:31 am #69897zodiac1978MemberHi Steven,
the problem is: I want to prevent customizing the file itself, so that I can maintain the locations on “Google My Maps”. Then our map is always up-to-date on all sites.
But it seems that Google is not exporting the correct icon. None of the default icons, no custom icon, it always uses https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png for the icon.
Using a static KML and changing this link does work, but if I want to prevent using a static file and editing this file, this does not work out.
Would it be possible to override the icon setting within WP Google Maps Pro? Just for the KML usage? The UI could be the same as for the “my location” or default marker setting.
All the best,
TorstenJuly 19, 2021 at 8:29 am #69919StevenModeratorHi Torsten,
Thank you so much for getting back to me.
Unfortunately, WP Google Maps can’t adjust these marker icons as essentially what is occuring is that WP Google Maps simply sends the URL of this KML to the Google Maps API which then gets processed, and then this determines what is displayed on the map.
I have taken a look at the Google Maps documentation, however, I am unable to locate a workaround, or an exact way to help achieve the desired result.
Kindest Regards,
Steven De BeerAugust 4, 2021 at 4:07 pm #70147zodiac1978MemberHi Steven,
I have found a solution and want to share it with you and your users. Maybe someone has the same problem like me and wants to solve it.
The problem is that the KML file is not using the icons (just one white icon is supported). I think this is due to the traffic it would generate (or it is a bug). The KMZ file is a zipped KML file, but it also supports more. For example this KMZ/Zip file can contain the icons which are then loaded locally.
So if you use Google My Maps to maintain a list of markers, you can export a network KMZ file of your layer and use this KMZ file in WP Google Maps Pro. And then the chosen icon is used. 🙂
The title of https://www.wpgmaps.com/using-kmlkmz-and-georss-files-with-wp-google-maps-pro/ is showing it correct, although the page itself just mentions KML files. But it is perfectly fine with KMZ (and even better, because now icons are supported).
All the best
TorstenAugust 5, 2021 at 6:57 am #70154StevenModeratorHi Torsten,
Thank you so much for getting back to us.
Thank you kindly for the update, we really appreciate it.
I am glad to hear you managed to get the desired result working.
Kindest Regards,
Steven -
AuthorPosts
- You must be logged in to reply to this topic.