-
Draw Shapes and Removal of symbols
Hi,
I would like to know if there exists any API to draw shapes such as circle in the SDK.
Also, i understand that, deleting a symbol means disabling it from being displayed on the map. Is there any way to remove that symbol totally? As in remove it from the memory.
Thanks.
-
-
While there is not any automated API to create new features with shapes like circles, all that you need to is build a list of vertices that form the shape that you want for a line or area, then add that feature to a layer. To create a circle that is a true ground distance, you can use the GM_CalcProjectedLocation function to create a series of points every so many degrees around the edge of a circle and create your feature with that.
The only way to completely remove a feature from memory is to close the layer that the feature is in. Deleting a feature just marks it as deleted, but it is still in memory and can be undeleted later.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
-
-
Hi, through your help, I have managed to draw shapes with transparency on my map using the SDK.
However, I noticed something odd. When I draw a shape with a green color fill, it seems to affect the zoom-in/out of the map. The zooming in/out seems to lag. When other color is used, eg. red, the zoom in/out is ok.
I am not very sure of what causes the above observations. Hope you can help. Thanks!
-
-
When you use translucency the SDK switches to drawing the areas with GDI+ rather than normal Windows GDI, although I wouldn't really expect a noticeable slowdown unless you are drawing lots of areas.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
-
-
Hi,
I tried drawing one shape with no transparency. I used a COLORREF RGB(0,255,0)
As i tried to zoom out to infinity, the system seems to lag when the polygon gets smaller and smaller.
-
-
I would actually expect the render to get faster as you zoomed out as no clipping is done and less pixels are actually modified. Have you timed the draw to make sure it is the source of the lag?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
-
-
Hi again.
I timed the draw. (I have a underlying vector map as base.)
Without any polygon, my map drew at 110 milliseconds.
With 1 Red polygon, my map drew at 110 milliseconds.
With 1 Green polygon, my map drew at 20528 milliseconds.
Hope this provide some useful information to you. Thanks
Last edited by melonzeus; 04-28-2009 at 06:02 AM.
-
-
I realised the above problem only exists when I have a vector map loaded
This map contains about 13000 features.
Hope this additional information is useful to you. Thanks again.
-
-
So if you have a vector map loaded the draw time is always slow or just when you add your translucent green polygon?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
-
-
Hi,
Here are some of the observations I have.
No lag (about 10 ms) experienced when a polygon with no transluceny is drawn on the screen without the vector map being loaded.
Slower draw time (about 100 ms) when just a vector map of 13000 points are drawn and shown on the screen. (No polygon is added yet)
Significant slower draw time when a vector of 13000 points are drawn on the screen with an additional green polygon (no transluceny) added .
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Powered by
vBulletin® Version 4.2.1
Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by
vBSEO 3.6.1

Copyright 2008-2012 Globalmapperforum.com
All times are GMT. The time now is 03:57 PM.
Bookmarks