Category : here-api

Is there a way to retrieve the segmentID from a specific position (lat/lng)? I need the segmentID for the routing API in avoid[segments] I tried reverse geocoding, but I could not find any information to obtain the segmentID. this.service.reverseGeocode( { at: ‘37.56042131221306,139.9987190961508’, spans: ‘segmentId’, locationattributes: ‘segmentId’ }, (result) => { console.log(result.items[0]) }, this.onError ) Result: ..

Read more

I’m trying to remove an "addEventListerner" from the map, but it is not working There is my code: function dbltapzoom(){ alert(“Remove”); } map.addEventListener(‘pointerdown’, function (evt) { var coord = map.screenToGeo(evt.currentPointer.viewportX, evt.currentPointer.viewportY); polygonStroke.setGeometry(coord); polygonStroke.setVisibility(true); locationVertices.push(polygonStroke); map.addObject(polygonStroke); },false); map.addEventListener(‘dbltap’, function () { map.removeEventListener(‘pointerdown’,dbltapzoom,false); }); Honestly, I don’t know how to make this work. Any help and explanation ..

Read more

I want to create polygon by mouse click using HERE javascript API. Below is my code, but I feel confused about how to add the polyline for the polygon, any ideas? And the polygon creation should stop when I double click map.addEventListener(‘tap’, function (evt) { var coord = map.screenToGeo(evt.currentPointer.viewportX, evt.currentPointer.viewportY); if (evt.currentPointer.button == 0) { ..

Read more

We have upgrade the project Angular version 7 to angular version 10, but on Here Map API not working on below First Angular component is working fine When we change or select other component Here map is not rendering getting below error ERROR Error: Uncaught (in promise): TypeError: Cannot read property ‘immediateRedraw’ of null TypeError: ..

Read more

I have a HERE Maps map displayed on a simple webpage with a multiselect dropdown and a couple of buttons. I’m using the contextmenu event to show a context menu on right-click, like so: var map = new H.Map( document.getElementById(‘mapContainer’), maptypes.raster.normal.map, { zoom: 12, center: { lat: -33.81, lng: 150.78 }, pixelRatio: window.devicePixelRatio || 1, ..

Read more