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
a7086234
Commit
a7086234
authored
Mar 14, 2019
by
Emmanuel René Huchim Puc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map layer into success response
parent
f04c6a86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
minimap.js
reports/static/reports/js/minimap.js
+16
-19
No files found.
reports/static/reports/js/minimap.js
View file @
a7086234
...
...
@@ -23,6 +23,12 @@ var map = new ol.Map({
//addLayer
function
addImageLayer
(
labelDate
)
{
$
.
ajax
({
type
:
'POST'
,
dataType
:
"json"
,
data
:
{
'purchase_id'
:
purchase_id
,
'report'
:
zone
,
'date'
:
labelDate
},
url
:
'/reports/tiles/tileinfo'
,
success
:
function
(
data
)
{
map
.
removeLayer
(
imagelayer
)
var
xyz
=
new
ol
.
layer
.
Tile
({
...
...
@@ -39,17 +45,8 @@ function addImageLayer(labelDate) {
imagelayer
=
xyz
;
map
.
addLayer
(
xyz
);
$
.
ajax
({
type
:
'POST'
,
dataType
:
"json"
,
data
:
{
'purchase_id'
:
purchase_id
,
'report'
:
zone
,
'date'
:
labelDate
},
url
:
'/reports/tiles/tileinfo'
,
success
:
function
(
data
)
{
var
extent
=
ol
.
proj
.
transformExtent
(
data
.
boundingBox
,
'EPSG:4326'
,
'EPSG:3857'
);
map
.
getView
().
fit
(
extent
,
{
duration
:
800
})
},
error
:
function
(
data
)
{
console
.
error
(
"request error: "
,
{
'msg'
:
'tile info request failed'
});
}
});
}
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