[OpenLayers-Users] Vectors layer over Google

taviroquai taviroquai at gmail.com
Thu Aug 6 10:32:12 EDT 2009


Hi all!

I'm using the sphericalMercator has recomended in
http://trac.openlayers.org/wiki/SphericalMercator

What am i doing wrong? It should be simple like this:

map = new OpenLayers.Map('map');
            map.addControl(new OpenLayers.Control.LayerSwitcher());

            var base = new OpenLayers.Layer.Google(
                "Google Hybrid",
                {type: G_HYBRID_MAP, numZoomLevels: 20, sphericalMercator:
true}
            );

            var wvect = new OpenLayers.Layer.GML("World Borders", "doc.kml",
               {
                format: OpenLayers.Format.KML,
                formatOptions: {
                  extractStyles: true,
                  extractAttributes: true,
                  maxDepth: 20
                }
               });
            map.addLayers([base, wvect]);

            map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 3);

The doc.kml i got from
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=300541&page=all

I would like to click on a contry and pop up information from the doc.kml.

Thanks in advance.

Marco
-- 
View this message in context: http://n2.nabble.com/Vectors-layer-over-Google-tp3398605p3398605.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list