repositories { flatDir { dirs 'libs' } } dependencies { implementation(name:'HERE-sdk', ext:'aar') // Depending on your specific project configuration you may have other entries here. }
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
HEREMap.prototype.addMarker = function (coordinates, icon) { // Add an markerOptions object var markerOptions = {} // three different icons for origin, destination and the user's current position var icons = { iceCream: { url: './images/marker-gelato.svg', options: { size: new H.math.Size(26, 34), anchor: new H.math.Point(14, 34) } }, origin: { url: './images/origin.png', options: { size: new H.math.Size(32, 32), anchor: new H.math.Point(12, 36) } }, destination: { url: './images/destination.png', options: { size: new H.math.Size(32, 32), anchor: new H.math.Point(12, 36) } } }
if (icons[icon]) { markerOptions = { icon: new H.map.Icon(icons[icon].url, icons[icon].options) } }
var marker = new H.map.Marker(coordinates, markerOptions) this.map.addObject(marker)