Hi Alberto,
>> In the attached example, you can see 300 markers, and 30 routes
Actually 300 markers, and 300 routes.
I did a test noting the time it takes to draw the map. On my system, as a reference point, it takes 4.8 seconds to draw.
I did a bit of tracing, and because Refresh does a GetMap, and in some cases GetMap does a RefreshExtras (and then Refresh calls refreshExtras) the routes and markers were being drawn twice. I've added an optimization to prevent that happening.
This brought the drawing time down to 2.8 seconds.
I changed the icon to use a ~ as per my other mail, this brought it down to 2.4 seconds.
I noted that , by default, routes use anti-aliased lines. I added a property to make the lines not-anti-aliased and that brought the time down to 1.4 seconds. To use this you would set;
net.antiAlias = false
Probably the next optimization would be to allow the Draw engine to load, and cache, icons which would make drawing them a lot faster. This would shave off a few more tenths - perhaps as many as 4 or 5 tenths of a second. But that's quite a big change for Draw - something I've not got the time to embark on right now.
>> If the code cannot be changed... may be having a RefreshRoutes() and a RefreshMarkers() and a RefreshRoute(IdRoute) and a RefreshMarker(IdRoute) may be adding a IdRoute to the NetMapWaypointsQueueType queue
If you follow the code in NetMaps.clw you'll see that refreshExtras already breaks into RefreshRoutes and RefreshMarkers.
>> and have the cursor changed to cursor:wait while its drawing or moving..
I'm not sure what you have in mind here, but certainly you can set the cursor in the embed points in .Refresh etc if you like.
The maps are themselves cached (into c:\temp\maps by default, if you don't specify another location) so that part will go faster as you cache an area, and various zoom levels.
cheers
Bruce