Closed kor-devops closed 1 year ago
Depends on what you mean by "polygon". If you are talking about user drawing a totally custom polygon, then you'd need to go down to the MarkerBase
. There's nothing built-in in marker.js to help you. On the other hand, if you want to create a marker representing a specific polygon like a star or a hexagon or whatever, then there's a tutorial for that.
Thank you!
I'm sorry, but I'll ask you an additional question.
I want to make a polygon with four vertices. Should I use the RectangularBoxMarkerBase?
Where should I refer to if I want to insert shapes with code instead of mouse selection?
1) If you mean a "fixed" shape polygon then yes. Just refer to the tutorial/sample I mentioned. You just change the triangle drawn to whatever you want to draw.
2) marker.js 2 is focusing on interactive marker creation. While it's probably possible to insert the marker from code, it's not the intended usage scenario.
I want to create a custom marker. Can we make a polygon? Which marker base should I inherit?