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
.draggable:hover {
opacity: 1;
}
/*
.title{
position: absolute;
top: 2%;
......@@ -113,4 +113,5 @@ body
#reportPage{
height: 940px !important;
}
\ No newline at end of file
}
*/
......@@ -160,13 +160,13 @@
<i class="fa fa-eye showChart"></i>
<i class="fa fa-eye-slash hideChart" style="display:none"></i>
<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="label label-primary pull-right"></span>
</span>
</a>
</li>
<li>
<!-- <li>
<a class="treeview " href="#" onclick="showComparisons()">
<i class="fa fa-eye showImage"></i>
<i class="fa fa-eye-slash hideImage" style="display:none"></i>
......@@ -176,6 +176,6 @@
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</li> -->
</ul>
</div>
\ No newline at end of file
</div>
This diff is collapsed.
......@@ -264,11 +264,13 @@ def wsProcessProgress(request):
# tiles
def tiles(request, purchase_id, report, date, z, x, y):
print("tiles!!!")
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_path = absolute_path + tile_folder + image
print(image_path)
if not os.path.exists(image_path):
# raise Http404
......@@ -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
@csrf_exempt
def tileinfo(request):
print("tileinfo!!!")
if request.is_ajax():
req = dict(request.POST)
resource_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out'
print(req)
print(req['report'][0])
if req['report'][0]:
resource_path += '/' + req['report'][0] + '/tiles/'
if req['report'][0]!="mask":
resource_path += '/' + req['report'][0] + '/TCI/tiles/'
else:
resource_path += '/mask/TCI/tiles/'
resource_path += req['date'][0] + '_TCI_60m/tilemapresource.xml'
print(resource_path)
if not os.path.exists(resource_path):
raise Http404
tree = ET.parse(resource_path)
print(tree)
bounding_box = tree.find('BoundingBox')
sets = [set.get('order') for set in tree.findall('TileSets/TileSet')]
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