Load external data on Geoman with correct type #899
-
Hey, probably is just a simple question, but, i've been trying to load some external data into my application that uses This is one example:
However, every time, this data is loaded, is been loaded as polygon, not as a this is how i'm doing to load:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is because Rectangle is not existing in GeoJSON definition. You need to check if the feature is a Rectangle and then create a new shape.
If you don't have the shape property you can use this code:
|
Beta Was this translation helpful? Give feedback.
-
@Falke-Design It worked, thanks for helping me with that. |
Beta Was this translation helpful? Give feedback.
This is because Rectangle is not existing in GeoJSON definition. You need to check if the feature is a Rectangle and then create a new shape.
I see that you have the
shape
property, so you can check on this if it is a Rectangle: