hi every one
i see multi object to draw shape on client side in think GEO Demo ( picture of this , attached )
how can i add this to may Map and how can i access to drawn shape??
thanks
Hiw can i access to drawble shape
Hi Alireza,
After you check those buttons codes, you should see the codes like:
<
asp:ImageButton
ID
=
“buttonNormal”
runat
=
“server”
ToolTip
=
“Normal Mode”
ImageUrl
=
"~/theme/default/samplepic/Cursor.png"
OnClientClick
=
“Map1.SetDrawMode(‘Normal’);return false;”
/>
<
asp:ImageButton
ID
=
“buttonDrawPoint”
runat
=
“server”
ToolTip
=
“Draw Point”
ImageUrl
=
"~/theme/default/samplepic/point28.png"
OnClientClick
=
“Map1.SetDrawMode(‘Point’);return false;”
/>
<
asp:ImageButton
ID
=
“buttonDrawLine”
runat
=
“server”
ToolTip
=
“Draw Line”
ImageUrl
=
"~/theme/default/samplepic/line28.png"
OnClientClick
=
“Map1.SetDrawMode(‘Line’);return false;”
/>
<
asp:ImageButton
ID
=
“buttonDrawRectangle”
runat
=
“server”
ToolTip
=
“Draw Rectangle”
ImageUrl
=
"~/theme/default/samplepic/rectangle28.png"
OnClientClick
=
“setDrawRectangle();return false;”
/>
The key is the OnClientClick event where it will trigger the client side “Map1” method “SetDrawMode”. For the Map1 instance, it actually is a client side map which is corresponding our server map. When you define a server map control, then a client side map also will be created automatically with a same name “Map1”. The client side map is inherited from OpenLayers map and we append a lot of help methods to this client side map.
Here is our client side API document, please review it. thinkgeo.com/forums/MapSuite…fault.aspx
When you draw a shape on the map, then it is only drawn on the client side map, so we will still need to save it on the server side and that’s why you can see there is a save button.
Hope it helps and let us know if any questions.
Thanks,
Troy
That link is no longer valid.
thinkgeo.com/forums/MapSuite...fault.aspx
Do you have a sample that shows how this is done?
Hi Jose,
As below is the new link:
Wish that’s helpful.
Regards,
Don