def wkt function

parent 17244ee6
...@@ -83,7 +83,7 @@ OpenStreetMapsClass.prototype.geolocation = function() ...@@ -83,7 +83,7 @@ OpenStreetMapsClass.prototype.geolocation = function()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** /**
* Draw a polygon in the map * Draw a polygon in the map
* @param jsonObj Longitude * @param coords coords to draw
*/ */
OpenStreetMapsClass.prototype.addPolygon = function(coords) OpenStreetMapsClass.prototype.addPolygon = function(coords)
{ {
...@@ -110,6 +110,17 @@ OpenStreetMapsClass.prototype.addPolygon = function(coords) ...@@ -110,6 +110,17 @@ OpenStreetMapsClass.prototype.addPolygon = function(coords)
document.getElementById("id_polygon").value = feature.getGeometry().clone().transform( 'EPSG:3857', 'EPSG:4326').getCoordinates(); document.getElementById("id_polygon").value = feature.getGeometry().clone().transform( 'EPSG:3857', 'EPSG:4326').getCoordinates();
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/**
* set value in input with wkt format
* POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))
* MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20)))
* @param coords to draw
*/
OpenStreetMapsClass.prototype.setPolygonInputValue = function(coords)
{
// todo
}
//------------------------------------------------------------------------------
/** /**
* @param lng Longitude * @param lng Longitude
* @param lat Latitude * @param lat Latitude
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment