<html>
<head>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<link rel="stylesheet" type="text/css" href="https://js.api.here.com/v3/3.0/mapsjs-ui.css?dp-version=1542186754" />
<script type="text/javascript" src="https://js.api.here.com/v3/3.0/mapsjs-core.js"></script>
<script type="text/javascript" src="https://js.api.here.com/v3/3.0/mapsjs-service.js"></script>
<script type="text/javascript" src="https://js.api.here.com/v3/3.0/mapsjs-ui.js"></script>
<script type="text/javascript" src="https://js.api.here.com/v3/3.0/mapsjs-mapevents.js"></script>
</head>
<body>
<div id="mapContainer" style="width: 100%; height: 400px; background: grey" />
<script type="text/javascript" charset="UTF-8" >
// Instantiate a map and platform object:
var platform = new H.service.Platform({
'app_id': 'uQzQGZB2OnVD8gkXo6ij',
'app_code': '58Ve8xkHc3ChGBq0lwA9aQ',
useHTTPS: true
});
// Retrieve the target element for the map:
var targetElement = document.getElementById('mapContainer');
// Get default map types from the platform object:
var defaultLayers = platform.createDefaultLayers();
// Instantiate the map:
var map = new H.Map(
document.getElementById('mapContainer'),
defaultLayers.normal.map,
{
zoom: 10,
center: { lat: 52.51, lng: 13.4 }
});
// Create the parameters for the geocoding request:
var geocodingParams = {
searchText: 'Sandvikavegen 222, 2312 Ottestad'
};
// Define a callback function to process the geocoding response:
var onResult = function(result) {
var locations = result.Response.View[0].Result,
position,
marker;
// Add a marker for each location found
for (i = 0; i < locations.length; i++) {
position = {
lat: locations[i].Location.DisplayPosition.Latitude,
lng: locations[i].Location.DisplayPosition.Longitude
};
marker = new H.map.Marker(position);
map.addObject(marker);
}
};
// Get an instance of the geocoding service:
var geocoder =...