PDA

View Full Version : How to add KmlLayer on Ext.Map



sensar
26 Nov 2010, 10:08 PM
Just wanting to add a route using kml in Sencha Touch.

This doesn't work. Any clues?


routeMap = new Ext.Map({

title: 'Nearest Stop',
useCurrentLocation: true,
mapOptions : {
zoom : 14
},

listeners : {
maprender : function(comp, map){
var routeLayer = new google.maps.KmlLayer(
'http://localhost:8080/sencha/kml/200U.kml');
routeLayer.setMap(map);

}

}
});Any help would be appreciated. Thanks.

sensar
27 Nov 2010, 9:40 PM
Sorry this works. Just that my web server wasn't serving kml pages correctly.

jnw
24 May 2011, 7:07 PM
Has anyone used a KmlLayer overlaid on a Google Map with popup kml infowindows? A little different from loading markers since the infowindow content is embedded in the kml file.



kmlcovLayer = new google.maps.KmlLayer(url, {preserveViewport:true});
kmlcovLayer.setMap(map);


The infowindows work fine in Chrome, Safari and but not when viewing on iPad or iPhone.

Just wondering if I'm missing something.

Thanks