here-ios-sdk-examples
here-ios-sdk-examples copied to clipboard
NMAMapPolygon is not drawn when there are coordinates of different altitudes
let coordinates: [NMAGeoCoordinates] = [
NMAGeoCoordinates(latitude: 35.6519104, longitude: 139.7700593, altitude: 100)
NMAGeoCoordinates(latitude: 35.6519654, longitude: 139.7697414, altitude: 100)
NMAGeoCoordinates(latitude: 35.6521398, longitude: 139.7696503, altitude: 50)
]
let polygon = NMAMapPolygon(vertices: coordinates)
polygon.fillColor = .yellow
mapView.add(mapObject: polygon)
It is only drawn when all altitudes are the same. Please help me.
- HERE SDK 3.17
- iPad mini 5, iOS 13.4.1
It is expected behaviour as polygon is 2D plane figure. https://en.wikipedia.org/wiki/Polygon.
Is there any way to draw a flat shape in 3d? I am trying to draw a plane perpendicular to the ground.
As a workaround you can use NMAMapGeoModel, see https://developer.here.com/documentation/ios-premium/3.18/dev_guide/topics/map-objects-and-interaction.html
Regarding current issue, we will need to decide whether to fix it as it is low priority for us.
https://user-images.githubusercontent.com/9702625/119117792-cbd94d80-ba53-11eb-9800-bbeda326e1da.mov
An error occurred when using NMAImage to draw NMAGeoMesh over a large area. With 1 small area, everything works very well.