Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
bdfb6a27
Commit
bdfb6a27
authored
May 23, 2018
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
def wkt function
parent
17244ee6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
openLayers4.js
catalog/static/js/openLayers4.js
+12
-1
No files found.
catalog/static/js/openLayers4.js
View file @
bdfb6a27
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment