
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@impargo/react-here-maps
Advanced tools
React Wrapper for the HERE Maps API for JavaScript (v3.1)
The module is dependant on @here/maps-api-for-javascript packaged and hosted by HERE. To make sure it installs correctly in your environment, make sure you have the correct registry URL configured.
npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript/
@here:registry=https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript/
Declare your HERE Maps component using the following React syntax:
import HEREMap from 'react-here-maps';
export const Map = () => {
return (
<HEREMap
appId="{your app_id}"
appCode="{your app_code}"
center={{ lat: 0, lng: 0 }}
zoom={14}
/>
)
}
If you would like to display a marker as well, you can do so as follows:
import HEREMap, { Marker } from 'react-here-maps';
const CENTER = { lat: 0, lng: 0 };
export const Map = () => {
return (
<HEREMap
appId="{your app_id}"
appCode="{your app_code}"
center={CENTER}
zoom={14}
>
<Marker {...CENTER}>
<div className="circle-marker" />
</Marker>
<Route points={[{lat, lon}]} />
</HEREMap>
)
}
This entire project is written in TypeScript, so refer to the interfaces of each of the supported components in the code.
This component renders the map itself and controls the visible layers. It requires a valid apiKey from HERE.
Can be used as a child to the map component to render a marker on the map. The content of the marker is controlled either via children, or the bitmap prop.
Any children passed to the marker will be rendered as static markup and used as a DomIcon.
The bitmap is used to create an Icon that is used as the marker. This is usually more performant than passing the children prop. Specially that the icons are cached.
If neither
childrennorbitmapare supplied, a default icon is used.
Supports event handling via callbacks
onTap,onPointerLeave,onPointerMove,onPointerEnter,onDragStart,onDrag, andonDragEnd.
This component clusters multiple nearby markers. You can supply different icons for the clusters and for the individual data points via getBitmapForCluster and getBitmapForPoint respectively. The clustering behavior is controlled via clusteringOptions.
You can also provide callbacks for clicking on the cluster icon or individual markers.
Renders a polyline on the map by passing an array of { lat, lng } points.
Supports event handling via callbacks
onTap,onPointerLeave,onPointerMove,onPointerEnter,onDragStart,onDrag, andonDragEnd.
In the HERE HARP Engine, the route direction arrows need to be rendered separately, by using an additional Polyline component than the route itself.
For the arrows to show up, the style prop in the PolyLine needs to include a strokeColor, lineWidth, lineDash and a lineDashImage.
lineDash is a tuple indicating the painted and non painted segments. The painted segment cannot be zero. Ex: [1, 5].
lineDashImage can be any HTMLImageElement object. You can also used the H.map.SpatialStyle.DashImage.ARROW bundled by HERE.
For an example check the testbench.
To generate a pre-release package from the changes in a pull request, add a /publish comment in the PR. This will publish a new package version and add a comment in the PR with the details of the published version.
This project was originally forked from https://github.com/Josh-ES/react-here-maps, however, this project has since deviated significantly from the original project after several rewrites to support newer HERE APIs and React versions.
Credit is due to the original creator and contributors.
The original fork can be found here.
FAQs
React.js HERE Maps component
The npm package @impargo/react-here-maps receives a total of 67 weekly downloads. As such, @impargo/react-here-maps popularity was classified as not popular.
We found that @impargo/react-here-maps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.