On Mar 5, 6:50 pm, "J.M." <
jordim...@gmail.com> wrote:
> Hello,
>
> I have added a google maps api to a blog site, and works fine. But now I
> would like to add a KML file (from a public server) and it doesn't work.
> Any ideas to fix the code in blue?
What code in blue?
>
>
> > function initialize() {
> > var mapOptions = {
> > zoom: <?php get_option_tree('zoom', '', true); ?>,
> > mapTypeId: google.maps.MapTypeId.<?php get_option_tree('map_type',
> > '', true); ?>,
> > center: stockholm
> > };
>
> > map = new google.maps.Map(document.getElementById("map_canvas"),
> > mapOptions);
>
> > var kml = new GGeoXml("
http://www.mydomain.com/name.kml");
That file doesn't exist.
If you are using the v3 API, GGeoXml doesn't exist either (which
should be obvious from the javascript errors). Try using the v3
equivalent (KmlLayer).
> > map.addOverlay(kml)
Also a v2 method, are you using v3 of the Google Maps Javascript API?
Or v2, if so that has a separate group:
http://groups.google.com/group/google-maps-api
-- Larry
> > }