From: Benoit B. <be...@gm...> - 2012-03-12 19:07:32
|
Again another KML question! Here is how i populate my Kml layer the question is how do i reproject every features returned by the Kml so they can be shown properly. My Kml is made with EPSG:4326 projection (Lon , Lat) and i want to show it on Google Map which is working with EPSG:900913 projection (X in meter, Y in meter): Thanks in advance for any hint/solution. KML kmlReader = *new* KML(); kmlReader.getJSObject().setProperty("extractStyles", *true*); kmlReader.getJSObject().setProperty("extractAttributes", *true*); VectorFeature[] features = kmlReader.read(kml); Vector vectorLayer = *new* Vector("KML"); LayerOptions layerOptions = *new* LayerOptions(); vectorLayer.addOptions(layerOptions); vectorLayer.addFeatures(features); vectorLayer.setIsBaseLayer(*false*); *return* vectorLayer; |