0

I am loading a KML file using geoxml3. the center position gets applied when google maps loads but once geoxml3 applies the kml file it moves the center position.

var myOptions = {
        zoom : 2,
        minZoom:2,
        maxZoom:10,
        center : latlng,
        disableDefaultUI: true,
        suppressInfoWindows : true,
        preserveViewport : true
    };
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

    var geoXml = new geoXML3.parser({
        map: map,
        singleInfoWindow: false,
        afterParse: useTheData,
        suppressInfoWindows : true,
        center : latlng
    });
    geoXml.parse(url_kml+'basins.kml');
geocodezip
  • 158,664
  • 13
  • 220
  • 245
shorif2000
  • 2,582
  • 12
  • 65
  • 137

1 Answers1

5

set the zoom-option of the parser-options to false

var geoXml = new geoXML3.parser({
        map: map,
        singleInfoWindow: false,
        afterParse: useTheData,
        suppressInfoWindows : true,
        zoom : false
    });

https://code.google.com/p/geoxml3/wiki/ParserReference#geoXML3.parser_Options

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201