-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mapper Frontend: routing to feature (#1963)
* feat(entities): store selected entity coordinate to store * feat(maplibre-gl-directions): package add for maplibre routing feature * feat(main): store clicked entity coordinate to store * feat(geolocation): route path add from user location to selected entity * fix(icon): icon add * fix(button): add css for button type link * feat(dialog-entities-actions): navigate btn add, other button syling update * fix(geolocation): ts type add * feat(entities): entityToNavigate & toggleGeolocation state add to store * fix(dialog-entities-actions): navigate to entity function trigger on btn click * refactor(main): geolocation status handle on child component, select payload for setSelectedEntityCoordinate action * fix(geolocation): handle toggle geolocation on geolocation component itself * feat(location): location img add * fix(main): upate entity fill-color * feat(maplibre-directions): custom styling for direction routes * fix(geolocation): load destination location image, custom layer style load * fix(entities): turn off geolocation by default * feat(geolocation): show tooltip popup to users indicating geolocation feature to be turned on * fix(main): remove zoom buttons from map
- Loading branch information
Showing
11 changed files
with
398 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// snapline: line from waypoint to road | ||
export const layers = [ | ||
{ | ||
id: 'maplibre-gl-directions-snapline', | ||
type: 'line', | ||
source: 'maplibre-gl-directions', | ||
layout: { | ||
'line-cap': 'round', | ||
'line-join': 'round', | ||
}, | ||
paint: { | ||
'line-dasharray': [2, 2], | ||
'line-color': '#000000', | ||
'line-opacity': 0.65, | ||
'line-width': 2, | ||
}, | ||
filter: ['==', ['get', 'type'], 'SNAPLINE'], | ||
}, | ||
|
||
// primary route | ||
{ | ||
id: 'maplibre-gl-directions-routeline', | ||
type: 'line', | ||
source: 'maplibre-gl-directions', | ||
layout: { | ||
'line-cap': 'butt', | ||
'line-join': 'round', | ||
}, | ||
paint: { | ||
'line-width': 12, | ||
'line-opacity': 1, | ||
'line-color': '#4285f4', | ||
}, | ||
filter: ['==', ['get', 'route'], 'SELECTED'], | ||
}, | ||
|
||
// alternative route | ||
{ | ||
id: 'maplibre-gl-directions-alt-routeline', | ||
type: 'line', | ||
source: 'maplibre-gl-directions', | ||
layout: { | ||
'line-cap': 'butt', | ||
'line-join': 'round', | ||
}, | ||
paint: { | ||
'line-width': 12, | ||
'line-opacity': 0.8, | ||
'line-color': '#547fff', | ||
}, | ||
filter: ['==', ['get', 'route'], 'ALT'], | ||
}, | ||
|
||
// only apply icon-style to the destination waypoint as we have icon for the origin | ||
{ | ||
id: 'maplibre-gl-directions-waypoint', | ||
type: 'symbol', | ||
source: 'maplibre-gl-directions', | ||
layout: { | ||
'icon-image': 'location', | ||
'icon-anchor': 'bottom', | ||
'icon-ignore-placement': true, | ||
'icon-overlap': 'always', | ||
'icon-size': 0.5, | ||
}, | ||
filter: ['all', ['==', ['get', 'type'], 'WAYPOINT'], ['==', ['get', 'category'], 'DESTINATION']], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.