Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"whatwg-fetch": "^3.6.20"
},
"dependencies": {
"@here/maps-api-for-javascript": "^1.62.0",
"@here/maps-api-for-javascript": "^1.64.1",
"lodash": "^4.15.0"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion src/HEREMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
animateCenter,
useVectorTiles,
engineType = H.Map.EngineType.HARP,
}, ref) => {

Check warning on line 101 in src/HEREMap.tsx

View workflow job for this annotation

GitHub Actions / lint

Refactor this function to reduce its Cognitive Complexity from 41 to the 15 allowed
if (engineType === H.Map.EngineType.WEBGL) {
throw new Error('WEBGL Engine is not supported.')
}
Expand Down Expand Up @@ -224,7 +224,7 @@
zoomOnMarkers,
zoomOnMarkersSet,
}
}, [map])

Check warning on line 227 in src/HEREMap.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useImperativeHandle has missing dependencies: 'addToMarkerGroup', 'animateCenter', 'animateZoom', 'removeFromMarkerGroup', 'screenToGeo', 'zoomOnMarkers', and 'zoomOnMarkersSet'. Either include them or remove the dependency array

useEffect(() => {
if (unmountedRef.current) {
Expand Down Expand Up @@ -256,7 +256,6 @@
{
center,
engineType,
pixelRatio: hidpi ? 2 : 1,
zoom,
},
)
Expand Down Expand Up @@ -298,7 +297,7 @@
unmountedRef.current = true
map?.dispose()
}
}, [])

Check warning on line 300 in src/HEREMap.tsx

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has missing dependencies: 'apiKey', 'center', 'disableMapSettings', 'engineType', 'hidpi', 'interactive', 'language', 'map', 'onMapAvailable', 'trafficLayer', 'useVectorTiles', and 'zoom'. Either include them or remove the dependency array. If 'onMapAvailable' changes too often, find the parent component that defines it and wrap that definition in useCallback

useEffect(() => {
if (map) {
Expand Down
9 changes: 5 additions & 4 deletions src/useRasterLayers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ const getBaseLayer = ({
})

const service = platform.getRasterTileService({
format: 'jpeg',
queryParams: {
lang,
scale: hidpi ? 2 : 1,
ppi: hidpi ? 200 : 100,
style: trafficLayer ? 'lite.day' : 'logistics.day',
...(congestion
? {
Expand All @@ -49,7 +50,7 @@ const getBaseLayer = ({
})

const provider =
new H.service.rasterTile.Provider(service, { engineType: H.Map.EngineType.HARP, tileSize: hidpi ? 512 : 256 })
new H.service.rasterTile.Provider(service, { engineType: H.Map.EngineType.HARP })

return new H.map.layer.TileLayer(provider)
}
Expand All @@ -72,12 +73,12 @@ const getTruckOverlayLayer = ({
features: `vehicle_restrictions:${showActiveAndInactiveTruckRestrictions ? 'active_and_inactive' : 'permanent_only'}`,
style: 'logistics.day',
lang,
scale: hidpi ? 2 : 1,
ppi: hidpi ? 200 : 100,
},
})

const truckOverlayProvider =
new H.service.rasterTile.Provider(truckOnlyTileService, { engineType: H.Map.EngineType.HARP, tileSize: hidpi ? 512 : 256 })
new H.service.rasterTile.Provider(truckOnlyTileService, { engineType: H.Map.EngineType.HARP })

return new H.map.layer.TileLayer(truckOverlayProvider)
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,10 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==

"@here/maps-api-for-javascript@^1.62.0":
version "1.62.0"
resolved "https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript/-/@here/maps-api-for-javascript-1.62.0.tgz#6b8ef073c5f8786486dfdd7cb3194652d4a0c727"
integrity sha1-a47wc8X4eGSG3918sxlGUtSgxyc=
"@here/maps-api-for-javascript@^1.64.1":
version "1.64.1"
resolved "https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript/-/@here/maps-api-for-javascript-1.64.1.tgz#052cb73c1e604c4406bc8583b84780e7ec62a634"
integrity sha512-AslY4YFRIaCX9V8OxXYoZmbH2qK1LmxmnMyhhmBSfZd7Hk7pTqxMHXGhFjwQBJ5LICFtLxblqkumFCDqAePlvg==

"@humanwhocodes/config-array@^0.11.13":
version "0.11.14"
Expand Down
Loading