0👍
0👍
GeoJSON doesn’t have a native rectangle object. If you are passing in a polygon that is a rectangle in shape, it will be treated as a polygon (what appears to be happening here).
If you know the polygon is a rectangle shape, you make use of the extended GeoJSON specification in Azure Maps and add the subType
property to your polygon to let the drawing manager know it is a rectangle.
For example:
{
"type": "Feature",
"properties": {
"subType": "Rectangle"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[[-122.35568,47.612875],[-122.28444,47.612875],[-122.28444,47.58046],[-122.35568,47.58046],[-122.35568,47.6128758]
]
]
}
}
Source:stackexchange.com