Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
f3c55560
Commit
f3c55560
authored
5 years ago
by
ncastejon
Browse files
Options
Downloads
Patches
Plain Diff
Fix flyTo when click on the map
parent
a40009d0
No related branches found
No related tags found
1 merge request
!51
Fix flyTo
Pipeline
#1765
passed
5 years ago
Stage: build
Stage: deploy
Stage: post-deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/map/services/map.service.ts
+8
-2
8 additions, 2 deletions
src/app/map/services/map.service.ts
with
8 additions
and
2 deletions
src/app/map/services/map.service.ts
+
8
−
2
View file @
f3c55560
...
@@ -172,7 +172,14 @@ export class MapService {
...
@@ -172,7 +172,14 @@ export class MapService {
// 70 is the width of the dataset data details panel divided by 4 (by 2 because the map and the table
// 70 is the width of the dataset data details panel divided by 4 (by 2 because the map and the table
// share the remaining space and again by 2 because we want to center the point so there is half on the
// share the remaining space and again by 2 because we want to center the point so there is half on the
// left, half on the right)
// left, half on the right)
this
.
_map
.
flyTo
({
center
:
e
.
lngLat
,
curve
:
1
,
speed
:
0.4
,
offset
:
new
mapboxgl
.
Point
(
-
70
,
0
)
});
this
.
_map
.
panTo
(
e
.
lngLat
,
{
duration
:
500
,
// 70 is the width of the dataset data details panel divided by 4 (by 2 because the map and the table
// share the remaining space and again by 2 because we want to center the point so there is half on the
// left, half on the right)
offset
:
new
mapboxgl
.
Point
(
-
70
,
0
),
},
);
}
}
}
}
...
@@ -503,7 +510,6 @@ export class MapService {
...
@@ -503,7 +510,6 @@ export class MapService {
// left, half on the right)
// left, half on the right)
offset
:
new
mapboxgl
.
Point
(
-
70
,
0
),
offset
:
new
mapboxgl
.
Point
(
-
70
,
0
),
},
},
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment