• CommentAuthorvasisdas
    • CommentTimeOct 24th 2016
    Hi there!

    I need to do the polygon's editor for my project, but I'm stuck by few points. I could not find any information at community forum and in docs about how to manipulate with polygons (PolygonFence) directly using JavaScript API. That's why my main idea was to create points (ImageObject, etc.) and redraw polygon by them.

    But I need help to figure out issues below:

    - First of all, is there any way to handle polygon's events, line/point events and change them (by adding some callbacks, maybe)?

    - Can I create polygon with a hole inside (like a result of substraction for polygons which contain other one)?

    - How to get nearest point at the line from mouse click (new marker)?

    Any help is appreciated. Thanks
    Hi Vasisdas,

    Apologies for taking this long for us to respond. The notification message slipped through the cracks somehow. As for the polygon editor, have you looked at our turorial that comes with the SDK? By default, it's under "C:\Program Files (x86)\Telogis\GeoBase\GeoStream\server\scripts\tutorial.geofences.js". This will give you an overview of a very simple implementation of a polygon editor. If you need a more complex solution (that I assume you do) we can provide you with a sample application. The code would be a little bit too long to paste it here, but if you can email me at gbsupport@telogis.com, I will attach it to my reply.