Hi,
I'm trying to build an app to display one or more user "My
Maps" (eventually together with other Fusion Table content) in one
map.
I've made some progress exploring the Google MAPS V3 and the gdata
Maps APIs (google.gdata.maps.MapsService) but I'm not exactly where
I'd like to be.
I can add a MyMap as a KML layer but only using the "View in Google
Earth" link:
var ctaLayer = new google.maps.KmlLayer('
http://maps.google.com/
maps/ms?ie=UTF8&hl=en&vps=1&jsv=286b&msa=0&output=nl&msid=abc.def');
ctaLayer.setMap(gMap);
Using gdata I can get the KML data for individual features with gdata
Maps code like :
var featureEntries = featureFeedRoot.feed.getEntries();
featureEntries[i].getContent().$t;
and then loop to add 1 marker per feature.
What I'm trying to achieve is to add a whole user map in a single
step. Something that would look like :
var featureKLM = featureFeedRoot.feed.getContent().$t;
var ctaLayer = new google.maps.KmlLayer(featureKLM);
ctaLayer.setMap(gMap);
This sound trivial and I may be close to it but I can't figure out the
proper syntax. I couldn't google a good example of how to get a KLM
set out of the gdata Map API.
The direction I'm going it is to get a KLM set of all Features of a
single MyMap and create a new map layer with its content. Is it the
right approach? Can I programatically get a KLM document for a user
MyMap?
Any help will be appreciated.
Regards,