JavaScript library to transform HERE JSON objects to GeoJSON.
At the moment only a subset of the JSON response types provided by the HERE REST APIs is supported. This will be extended from time to time.
This is not an official HERE product!
Be sure to respect the HERE Service Terms when using their API.
To use this library in an HTML-web-application just include the JavaScript-file at dist/hj2gj.js
into your HTML-page. Otherwise just import this library as module like in the snippet below:
import {readIsolines} from 'here-json2geojson';
var hereIsolineResponse = // The response of the HERE REST API call
var isolineFeatColl = readIsolines(hereIsolineResponse);
> npm install
> npm run dist
Afterwards the single-file-build of the library is available under dist/hj2gj.js
Reads route-response object delivered by the HERE API and converts it to a GeoJSON FeatureCollection holding the route legs as line features.
Parameters
hereRouteResponse
Object HERE JSON for a route
Returns Object GeoJSON FeatureCollection
Reads HERE traffic weather conditions and transforms them to a GeoJSON FeatureCollection containing point features with weather info as attributes.
Parameters
weatherConditionsResponse
Object HERE JSON for weather conditions
Returns Object GeoJSON FeatureCollection
Reads places-response object delivered by the HERE API and converts it to a GeoJSON FeatureCollection holding the places as point features.
Parameters
herePlacesResponse
Object HERE JSON for a place
Returns Object GeoJSON FeatureCollection
Reads HERE traffic incidents and transforms them to a GeoJSON FeatureCollection containing point features.
Parameters
trafficIncidentsResponse
Object HERE JSON for traffic incidentsaddEndPoints
Boolean Should possible end points of incident be added to the FeatureCollection
Returns Object GeoJSON FeatureCollection
Reads isolines-response object delivered by the HERE API and converts it to a GeoJSON FeatureCollection.
Parameters
hereIsolineResponse
Object HERE JSON for isolines
Returns Object GeoJSON FeatureCollection
The initial development of this project has been sponsored by geomer GmbH from Heidelberg, Germany