draw multipolygon in map

parent fc0e7818
......@@ -84,16 +84,16 @@ function drawPolygon(element) {
osmap.removePolygon();
// draw wkt polygon
osmap.addWKTPolygon(polygon.wkt_polygon);
// osmap.addWKTPolygon(polygon.wkt_polygon);
// format coords to draw
// var coords = osmap.formatCoords(polygon.geojson.geometry.coordinates);
var coords = osmap.formatCoords(polygon.geojson.geometry.coordinates);
// get the biggest area
// var biggest = osmap.getBiggestPolygon(coords);
// draw coordsR
// osmap.addPolygon(biggest);
osmap.addPolygon(coords);
}
})
}
......@@ -148,7 +148,7 @@ function drawApiResponse(element) {
console.log("footprint:\n", data.product.footprint);
if (!prevfeature.has(data.uuid)){
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{
if (prevfeature.length != 0){
element.style.textDecoration = 'none';
......@@ -156,7 +156,7 @@ function drawApiResponse(element) {
prevfeature.delete(data.uuid);
}
}
}
}
}
......@@ -322,7 +322,6 @@ $(document).ready(function () {
});
console.log("DD: ", data);
productListGlobe.push(data);
});
......
......@@ -90,12 +90,12 @@ def productList(request):
catalog = []
for p in products:
# 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:
titleid = products[p]['title'].split("_")
products[p]['tileid'] = titleid[5][1:]
catalog.append({
'process' : process,
'start_date' : init_date,
......
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