diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-06 11:59:42 -0700 |
---|---|---|
committer | Ashutosh Bishnoi <mail2bishnoi@gmail.com> | 2022-02-15 11:28:09 +0530 |
commit | 682bc9db991ef5d550b6b0b780371f19359511ad (patch) | |
tree | 261e25a5edc102fa31c19af1fe365ebb89cd8d34 /modern/src/map/Map.js | |
parent | 158f8ba27f354b53f4d25613d1ff1828cbad0bea (diff) | |
download | trackermap-web-682bc9db991ef5d550b6b0b780371f19359511ad.tar.gz trackermap-web-682bc9db991ef5d550b6b0b780371f19359511ad.tar.bz2 trackermap-web-682bc9db991ef5d550b6b0b780371f19359511ad.zip |
# This is a combination of 30 commits.
# This is the 1st commit message:
Close socket on logout (fix #896)
# This is the commit message #2:
Fix lint
# This is the commit message #3:
Add calendar menu
# This is the commit message #4:
Add calendar file upload
# This is the commit message #5:
Disable icon tinting in Firefox
# This is the commit message #6:
Move ignition icon
# This is the commit message #7:
Specify icon sizes
# This is the commit message #8:
Fix lint issues
# This is the commit message #9:
Add accuracy button
# This is the commit message #10:
Merge shock and vibration alarms
# This is the commit message #11:
Add events alarm column
# This is the commit message #12:
Enable LocationIQ by default
# This is the commit message #13:
Update LocationIQ keys
# This is the commit message #14:
Fix selector style
# This is the commit message #15:
Support server change
# This is the commit message #16:
Update localization script
# This is the commit message #17:
Update localization
# This is the commit message #18:
Command to install dependency
# This is the commit message #19:
Update JavaScript libraries
# This is the commit message #20:
Fix modern app issues
# This is the commit message #21:
Fix image URL
# This is the commit message #22:
Fix user list (fix #898)
# This is the commit message #23:
Fix formatting issue
# This is the commit message #24:
Add option to disable reports
# This is the commit message #25:
Fix add button position
# This is the commit message #26:
Select device based on uniqueId
# This is the commit message #27:
Update devices list search
# This is the commit message #28:
Fix lint problems
# This is the commit message #29:
Changed devices list search
# This is the commit message #30:
Changed device list search
Diffstat (limited to 'modern/src/map/Map.js')
-rw-r--r-- | modern/src/map/Map.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 5e182a44..b020423a 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -8,7 +8,7 @@ import { SwitcherControl } from './switcher/switcher'; import deviceCategories from '../common/deviceCategories'; import { prepareIcon, loadImage } from './mapUtil'; import { - styleCarto, styleMapbox, styleMapTiler, styleOsm, + styleCarto, styleLocationIq, styleMapbox, styleMapTiler, styleOsm, } from './mapStyles'; import { useAttributePreference } from '../common/preferences'; import palette from '../theme/palette'; @@ -89,6 +89,7 @@ const Map = ({ children }) => { const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); const mapTilerKey = useAttributePreference('mapTilerKey'); + const locationIqKey = useAttributePreference('locationIqKey', 'pk.0f147952a41c555a5b70614039fd148b'); useEffect(() => { maplibregl.accessToken = mapboxAccessToken; @@ -96,6 +97,9 @@ const Map = ({ children }) => { useEffect(() => { switcher.updateStyles([ + { id: 'locationIqStreets', title: t('mapLocationIqStreets'), uri: styleLocationIq('streets', locationIqKey) }, + { id: 'locationIqEarth', title: t('mapLocationIqEarth'), uri: styleLocationIq('earth', locationIqKey) }, + { id: 'locationIqHybrid', title: t('mapLocationIqHybrid'), uri: styleLocationIq('hybrid', locationIqKey) }, { id: 'osm', title: t('mapOsm'), uri: styleOsm() }, { id: 'carto', title: t('mapCarto'), uri: styleCarto() }, { id: 'mapboxStreets', title: t('mapMapboxStreets'), uri: styleMapbox('streets-v11') }, |