Skip to content

Latest commit

 

History

History

Working with HERE Maps for JavaScript

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

HERE Maps API for JavaScript

It is possible to use the HERE Maps API for JavaScript.

GeoJSON Data display

You can refer to the documentation for covering data display using the GeoJSON file format.

// ... Initialize your map

// Update YOUR_ACCESS_TOKEN and the itinerary/XXX with your details
const url =
  "https://mapping.withalpaca.travel/v1/itinerary/XXX.geojson?accessToken=YOUR_ACCESS_TOKEN";

// Create GeoJSON reader which will down the specified file from Alpaca Travel
const reader = new H.data.geojson.Reader(url, {
  style: function (mapObject) {
    // Parsed geo object can be styled using setStyle method
    // Refer to styling at the here.com documentation
  },
});

// Start parsing the file
reader.parse();

// Add layer which shows GeoJSON data on the map
map.addLayer(reader.getLayer());

See More: