Commit 5e01a1cb authored by Irving Sánchez's avatar Irving Sánchez

Corregida la vista de tiles en el mapa. se muestran los tiles al hacer clic en...

Corregida la vista de tiles en el mapa. se muestran los tiles al hacer clic en un punto de la grafica
parent 75442042
...@@ -87,7 +87,7 @@ body ...@@ -87,7 +87,7 @@ body
.draggable:hover { .draggable:hover {
opacity: 1; opacity: 1;
} }
/*
.title{ .title{
position: absolute; position: absolute;
top: 2%; top: 2%;
...@@ -114,3 +114,4 @@ body ...@@ -114,3 +114,4 @@ body
#reportPage{ #reportPage{
height: 940px !important; height: 940px !important;
} }
*/
...@@ -160,13 +160,13 @@ ...@@ -160,13 +160,13 @@
<i class="fa fa-eye showChart"></i> <i class="fa fa-eye showChart"></i>
<i class="fa fa-eye-slash hideChart" style="display:none"></i> <i class="fa fa-eye-slash hideChart" style="display:none"></i>
<span class="showChart">Show Chart</span> <span class="showChart">Show Chart</span>
<span class="hideChart" style="display:none">Hidden Chart</span> <span class="hideChart" style="display:none">Hide Chart</span>
<span class="pull-right-container"> <span class="pull-right-container">
<span class="label label-primary pull-right"></span> <span class="label label-primary pull-right"></span>
</span> </span>
</a> </a>
</li> </li>
<li> <!-- <li>
<a class="treeview " href="#" onclick="showComparisons()"> <a class="treeview " href="#" onclick="showComparisons()">
<i class="fa fa-eye showImage"></i> <i class="fa fa-eye showImage"></i>
<i class="fa fa-eye-slash hideImage" style="display:none"></i> <i class="fa fa-eye-slash hideImage" style="display:none"></i>
...@@ -176,6 +176,6 @@ ...@@ -176,6 +176,6 @@
<span class="label label-primary pull-right"></span> <span class="label label-primary pull-right"></span>
</span> </span>
</a> </a>
</li> </li> -->
</ul> </ul>
</div> </div>
This diff is collapsed.
...@@ -264,11 +264,13 @@ def wsProcessProgress(request): ...@@ -264,11 +264,13 @@ def wsProcessProgress(request):
# tiles # tiles
def tiles(request, purchase_id, report, date, z, x, y): def tiles(request, purchase_id, report, date, z, x, y):
print("tiles!!!")
absolute_path = USERS_PATH + request.user.email + '/' + purchase_id + '/out' absolute_path = USERS_PATH + request.user.email + '/' + purchase_id + '/out'
tile_folder = '/' + report + '/tiles/' + date + '_TCI_60m' tile_folder = '/' + report + '/TCI/tiles/' + date + '_TCI_60m'
image = '/' + z + '/' + x + '/' + y + '.png' image = '/' + z + '/' + x + '/' + y + '.png'
image_path = absolute_path + tile_folder + image image_path = absolute_path + tile_folder + image
print(image_path)
if not os.path.exists(image_path): if not os.path.exists(image_path):
# raise Http404 # raise Http404
...@@ -296,24 +298,29 @@ def mergedTiles(request, purchase_id, date, z, x, y): ...@@ -296,24 +298,29 @@ def mergedTiles(request, purchase_id, date, z, x, y):
# read a xml file with tiles info to display and return that info # read a xml file with tiles info to display and return that info
@csrf_exempt @csrf_exempt
def tileinfo(request): def tileinfo(request):
print("tileinfo!!!")
if request.is_ajax(): if request.is_ajax():
req = dict(request.POST) req = dict(request.POST)
resource_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out' resource_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out'
print(req) print(req)
print(req['report'][0])
if req['report'][0]: if req['report'][0]!="mask":
resource_path += '/' + req['report'][0] + '/tiles/' resource_path += '/' + req['report'][0] + '/TCI/tiles/'
else: else:
resource_path += '/mask/TCI/tiles/' resource_path += '/mask/TCI/tiles/'
resource_path += req['date'][0] + '_TCI_60m/tilemapresource.xml' resource_path += req['date'][0] + '_TCI_60m/tilemapresource.xml'
print(resource_path)
if not os.path.exists(resource_path): if not os.path.exists(resource_path):
raise Http404 raise Http404
tree = ET.parse(resource_path) tree = ET.parse(resource_path)
print(tree)
bounding_box = tree.find('BoundingBox') bounding_box = tree.find('BoundingBox')
sets = [set.get('order') for set in tree.findall('TileSets/TileSet')] sets = [set.get('order') for set in tree.findall('TileSets/TileSet')]
origin = tree.find('Origin') origin = tree.find('Origin')
......
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