Richard Lloyd
asked on
Embed Google My Maps with Dynamic KML
The feature of being able to pull in a kml file from a ?q= querystring on to a googlemap is being decpracted in favour of Google's newer My Map system:
Viewing KML data in Google Maps
You may have received a notification in product saying "A Google Maps feature used on this page is changing soon. Custom map content will need to be migrated."
After February 2015, you will no longer able to view custom KML content in the classic version of Google Maps. KML is the file format Google Earth uses for the exchange of geographic information.
[https://support.google.com/maps/answer/41136?p=kml&hl=en&rd=1]
I currently generate a kml file from a database depending on various parameters and display if using a URL: https://maps.google.com/maps?hl=en&q=http://www.smartinsight.co.uk/loyalty/kml/MemberCount-29.kml&ie=UTF8&t=m&source=embed&output=classic&dg=feature
From February I will not be able to do this!
Can anyone show me a way of using a similar method with Google My Map or any other way to continue to include a kml file via a querystring in their new system.
Thanks
Viewing KML data in Google Maps
You may have received a notification in product saying "A Google Maps feature used on this page is changing soon. Custom map content will need to be migrated."
After February 2015, you will no longer able to view custom KML content in the classic version of Google Maps. KML is the file format Google Earth uses for the exchange of geographic information.
[https://support.google.com/maps/answer/41136?p=kml&hl=en&rd=1]
I currently generate a kml file from a database depending on various parameters and display if using a URL: https://maps.google.com/maps?hl=en&q=http://www.smartinsight.co.uk/loyalty/kml/MemberCount-29.kml&ie=UTF8&t=m&source=embed&output=classic&dg=feature
From February I will not be able to do this!
Can anyone show me a way of using a similar method with Google My Map or any other way to continue to include a kml file via a querystring in their new system.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Javascript is purely client side, so in essence, it should work as described.
ASKER
Got the answers that i was looking for.
Thanks
Thanks
ASKER
Just a quick question, can I insert the link to the kml file as a querystring and then pick it up in the javascript within the html file.
So the url would be
http://www.xyz.com/map.php?q=http://www.smartinsight.co.uk/loyalty/kml/MemberCount-29.kml
Then in the code :
var map;
var src = '<?php $_GET["q"]?>';
Richard