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
f9887eb2
Commit
f9887eb2
authored
Feb 05, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draw multipolygon in map
parent
fc0e7818
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
dataRetrieval.js
catalog/static/catalog/js/dataRetrieval.js
+5
-6
views.py
catalog/views.py
+2
-2
No files found.
catalog/static/catalog/js/dataRetrieval.js
View file @
f9887eb2
...
@@ -84,16 +84,16 @@ function drawPolygon(element) {
...
@@ -84,16 +84,16 @@ function drawPolygon(element) {
osmap
.
removePolygon
();
osmap
.
removePolygon
();
// draw wkt polygon
// draw wkt polygon
osmap
.
addWKTPolygon
(
polygon
.
wkt_polygon
);
//
osmap.addWKTPolygon(polygon.wkt_polygon);
// format coords to draw
// format coords to draw
//
var coords = osmap.formatCoords(polygon.geojson.geometry.coordinates);
var
coords
=
osmap
.
formatCoords
(
polygon
.
geojson
.
geometry
.
coordinates
);
// get the biggest area
// get the biggest area
// var biggest = osmap.getBiggestPolygon(coords);
// var biggest = osmap.getBiggestPolygon(coords);
// draw coordsR
// draw coordsR
// osmap.addPolygon(biggest
);
osmap
.
addPolygon
(
coords
);
}
}
})
})
}
}
...
@@ -148,7 +148,7 @@ function drawApiResponse(element) {
...
@@ -148,7 +148,7 @@ function drawApiResponse(element) {
console
.
log
(
"footprint:
\n
"
,
data
.
product
.
footprint
);
console
.
log
(
"footprint:
\n
"
,
data
.
product
.
footprint
);
if
(
!
prevfeature
.
has
(
data
.
uuid
)){
if
(
!
prevfeature
.
has
(
data
.
uuid
)){
element
.
style
.
textDecoration
=
'underline'
;
element
.
style
.
textDecoration
=
'underline'
;
prevfeature
.
set
(
data
.
uuid
,
osmap
.
addfootprint
(
data
.
product
.
footprint
,
prevfeature
));
prevfeature
.
set
(
data
.
uuid
,
osmap
.
addfootprint
(
data
.
product
.
footprint
,
prevfeature
));
}
else
{
}
else
{
if
(
prevfeature
.
length
!=
0
){
if
(
prevfeature
.
length
!=
0
){
element
.
style
.
textDecoration
=
'none'
;
element
.
style
.
textDecoration
=
'none'
;
...
@@ -156,7 +156,7 @@ function drawApiResponse(element) {
...
@@ -156,7 +156,7 @@ function drawApiResponse(element) {
prevfeature
.
delete
(
data
.
uuid
);
prevfeature
.
delete
(
data
.
uuid
);
}
}
}
}
}
}
}
}
}
}
...
@@ -322,7 +322,6 @@ $(document).ready(function () {
...
@@ -322,7 +322,6 @@ $(document).ready(function () {
});
});
console
.
log
(
"DD: "
,
data
);
productListGlobe
.
push
(
data
);
productListGlobe
.
push
(
data
);
});
});
...
...
catalog/views.py
View file @
f9887eb2
...
@@ -90,12 +90,12 @@ def productList(request):
...
@@ -90,12 +90,12 @@ def productList(request):
catalog
=
[]
catalog
=
[]
for
p
in
products
:
for
p
in
products
:
# img_link = products[p]['link_icon']
# img_link = products[p]['link_icon']
# img_link = img_link[:img_link.find("/")+2] + "emmhp:geoemm29@" + img_link[img_link.find("/")+2:]
# img_link = img_link[:img_link.find("/")+2] + "emmhp:geoemm29@" + img_link[img_link.find("/")+2:]
if
products
[
p
]
.
get
(
'tileid'
)
is
None
:
if
products
[
p
]
.
get
(
'tileid'
)
is
None
:
titleid
=
products
[
p
][
'title'
]
.
split
(
"_"
)
titleid
=
products
[
p
][
'title'
]
.
split
(
"_"
)
products
[
p
][
'tileid'
]
=
titleid
[
5
][
1
:]
products
[
p
][
'tileid'
]
=
titleid
[
5
][
1
:]
catalog
.
append
({
catalog
.
append
({
'process'
:
process
,
'process'
:
process
,
'start_date'
:
init_date
,
'start_date'
:
init_date
,
...
...
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