Yesterday we had a look at a simple polygon example. But that example was not exciting as it was all hard-coded with no user interaction and which means no fun! Today's example will deal with creating a polygon on the fly, i.e. an on-click polygon in action!
The code for creating a polygon is very much similar to creating a polyline! The only difference is that you need to replace "Polyline" by "Polygon" in such examples. Let's head on to our code.
The code for creating a polygon is very much similar to creating a polyline! The only difference is that you need to replace "Polyline" by "Polygon" in such examples. Let's head on to our code.
The output of the above code can be viewed in the result section above. If you have any doubts or queries regarding the above code then please comment here or feel free to drop me a mail! Till then, happy mapping!
Comments
Post a Comment
Please leave your comments here...