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
d448b293
Commit
d448b293
authored
Jul 08, 2020
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only draw polygons
parent
608400b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+14
-1
openLayers4.js
catalog/static/catalog/js/openLayers4.js
+1
-1
No files found.
catalog/static/catalog/js/dataRetrieval.js
View file @
d448b293
...
...
@@ -171,7 +171,20 @@ function drawPolygon(element) {
if
(
polygon
.
geojson
.
geometry
)
{
//var coords = osmap.formatCoords(polygon.geojson.geometry.coordinates);
// var biggest = osmap.getBiggestPolygon(coords);
osmap
.
addGeoJson
(
polygon
.
geojson
);
//---- temporal, borrar y activar addGeoJson---------------------------
if
(
polygon
.
geojson
.
geometry
.
type
===
"MultiPolygon"
)
{
var
coords
=
osmap
.
formatCoords
(
polygon
.
geojson
.
geometry
.
coordinates
);
var
biggest
=
osmap
.
getBiggestPolygon
(
coords
);
osmap
.
addPolygon
(
biggest
);
}
else
if
(
polygon
.
geojson
.
geometry
.
type
===
"Polygon"
)
{
osmap
.
addGeoJson
(
polygon
.
geojson
);
}
// ---------------------------------------------------------------------
//osmap.addGeoJson(polygon.geojson); // descomentar al borrar el otro
input_text
+=
", "
+
polygon
.
state
}
else
{
osmap
.
addWKTPolygon
(
polygon
.
wkt_polygon
);
...
...
catalog/static/catalog/js/openLayers4.js
View file @
d448b293
...
...
@@ -214,7 +214,7 @@ OpenStreetMapsClass.prototype.getBiggestPolygon = function(coords)
var
areas
=
[];
for
(
var
index
in
coords
)
{
var
polygon
=
new
ol
.
geom
.
Polygon
([
coords
[
index
]]);
var
area
=
ol
.
S
phere
.
getArea
(
polygon
);
var
area
=
ol
.
s
phere
.
getArea
(
polygon
);
areas
.
push
(
area
);
}
...
...
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