How to convert .shp or .kml file to Google Maps polygon coordinates? -


I have a .shp file and convert it to many devices (shp2kml, ESRI converter, qgis) in one kmili file tried . When I take a closer look inside the kml file, when I point to a location in Google Maps, the coordinates are different from the coordinates of the same area. On the other hand, all the shapes are being presented in the kml file ... However, I can not take them inside Google Maps (I do not want Google Maps to be used by Google Earth).

I do not intend to read this Google Maps .kml file because I have to do this.

Now, I would like to change .kml (or original .shp file) into Google Maps polygon (each shape is a polygon) How can I get it?

The Google Maps will be a big win for me before the right direction for polygons, right from the file. On Google, I did not get the answer.

Thank you!

I had the same problem!

If the feature object is a polygon:

  if (event.feature.getType () == 'polygon') {var gp = event feature.getGeometry (); // Return Polygon Geometry Object var gLG = gP.getArray () [0]; // Return the linearring geometry object var arPnt = gLG.getArray (); // Linearring var policy = Return to the number of new google.maps.Polygon ({path: arPnt}); }  

In a line:

  var poly = new google.maps.Polygon ({path: event.feature.getGeometry (.) GetArray () [0] .getArray ()});  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -