Draw a circle in a custom module
Hi,
We are integrating a Geocortex viewer (html5, 2.6.0) in one of our application. The viewer is opened in an iframe in our application and the communication between the both applications is made with postMessage().
We would like to allow the user to draw a circle on the map. The user will click on our part of the application and the viewer will ask him to draw the circle. We want that the interaction start from our application for some reasons. We don’t want to add a new item in a toolbar and our module in the viewer has no view, it more a bridge between the viewer and our application.
Is there any way to ask the user to draw a circle and then get this circle?
I’ve found that post (https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=9066000000007CrAAI) , but the answer is to use a tool, and we really don’t want to add this functionality in a tool bar since the interaction must start from our application.
I tried to use an esri tool bar to do so:
this.drawToolBar = new esri.toolbars.Draw(this.app.map);
this.drawToolBar.activate(esri.toolbars.Draw.CIRCLE);
this.drawToolBar.on("draw-end", this.onDrawEnd);
But, I get an error when activating the tool bar:
Uncaught TypeError: Cannot read property 'navigationManager' of undefinedH.activate
@ esri.js:4186esri.toolbars.Draw.activate
@ Mapping.js:1006
Is that the good way?
Thanks,
Sebastien
0
Please sign in to leave a comment.
Comments
0 comments