如何使用c sharp Coding将标记列表放在GMap控制上 [英] How can i place List of Markers on GMap Control using c sharp Coding

查看:87
本文介绍了如何使用c sharp Coding将标记列表放在GMap控制上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,





我用c#编码创建了windows应用程序。在我的应用程序中,我正在使用GMap-Control,在Gmap-Control中,我在地图上绘制了基于纬度和经度的大量标记。此控件适用于有限的数据。如果我选择大数据(超过2000条记录),它的速度太慢,并且系统暂停用于绘制标记。我正在使用FOR LOOP在地图上绘制每个标记(基于数据表中每行的纬度和经度)。是否有任何方法可以绘制除FOR LOOP之外的标记,这样可以尽快在Gmap-Control上绘制标记。



感谢提前

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

推荐答案

我对你的应用程序知之甚少,甚至更少关于GMap-Control,但for循环和你要使用的任何代码一样快。您应该使用循环的迭代器版本而不是递增索引;但这不会产生那么大的差别。由于正在完成的工作是在UI线程中,你不能多线程任何东西。



如果在获取每条记录时发生了处理,你可以创建预先计算的缓存记录信息数组。



创建更快显示外观的一件事是将记录分成块并重新显示添加每个'n'个记录后控制。
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.


这篇关于如何使用c sharp Coding将标记列表放在GMap控制上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆