Need Assistance with Automatic Syncing of MyMaps (google maps) within a website in development

Permalink
We've hit a bit of a stalemate with syncing maps so that when our client makes updates in their "my maps" account that it automatically updates on their new website with custom styles.

One of the four maps on the site that needs this functionality:
http://50.87.249.66/~downtpp1/maps-parking/parking-map...

It needs to keep all functionality as is and now automatically sync as "my maps" is adjusted without having to upload a KML file each time there's a change.

Does anyone have experience in this on prior projects? I'm hoping there is some sort of hack out there without having to rebuild from scratch.

 
Mainio replied on at Permalink Reply
Mainio
Did you already find some help for this?

We did this once for one project (not using c5) but it's not really that hard to implement anyways.

First thing is that the map needs to be public (you can make it public under the "Share" button) for the automatic updates to work.

Then, export the KML/KMZ with the "Keep data up to date" option enabled. More on that:
https://support.google.com/mymaps/answer/3109452...

When you export the KML/KMZ like this, the generated XML actually only contains one link. This link will automatically link to the latest KML data. You can use this link directly with the Google Maps JavaScript API instead of storing the KML file locally.

Please do note there is some caching at Google's end so even with this, there might be some minor delays for the map data to update at the other end.

For making it easy for the end user it would probably be a good idea to automate the reading of the URL from the KML/KMZ document and then store this URL in the DB and use it directly with the Maps API.

If you need some help for implementing this, feel free to contact us by PM! Or you can also send direct email to: info (at) mainiotech.fi.

Antti / Mainio