Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,


I have created windows application using c# coding. In my application i am using GMap-Control, in Gmap-Control i am plotting lot of Markers based on Latitude and Longitude on map.This control is working fine for limited data. If i go for Large data (More then 2000 records) its getting too slow and system is hanging for plotting Markers. I am using FOR LOOP to plot each marker on the map(Based on Latitude and Longitude for each rows in a data-table). Is there any way to plot markers other than FOR LOOP which makes the plotting of markers on Gmap-Control as fast as possible.

Thank's in Advance
Posted
Comments
Iqra Akmal 10-Jun-22 15:45pm    
@Mohan Gopi can you share your solution here. I am also trying to plot marker from database as latitude and longitude. But know success. Can you help and share how to plot markers from database?
Thanks

1 solution

I don't know much about your app and even less about GMap-Control but a for loop is as fast as any code you are going to use. You should use the iterator version of the loop rather than an incrementing index; but this won't make that much difference. Since the work being done is in a UI thread, you can't multi-thread anything.

If there is processing that occurs when getting each record, you can create an array of cached record info that is pre-computed.

One thing you can do to create the appearance of faster display is to break the records into chunks and redisplay the control after adding every 'n' records.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900