wpf 带有自定义地图提供程序的 GMap.NET.GMapControl?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37268415/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GMap.NET.GMapControl with custom map provider?
提问by Binakot
I want to use another map provider in my GMapControl.
我想在我的 GMapControl 中使用另一个地图提供程序。
For example, I can use GoogleMap:
例如,我可以使用 GoogleMap:
GMapControl myMapControl = new GMapControl();
myMapControl.MapProvider = GMapProviders.GoogleMap;
All build-in map providers are stored in GMapProviders.
所有内置地图提供者都存储在GMapProviders 中。
How can I add my custom GMapProvider?
如何添加我的自定义GMapProvider?
I need to add 2Gismap provider.
我需要添加2Gis地图提供程序。
采纳答案by Juan Montero
There is a WMSProvider class in:
有一个 WMSProvider 类:
It works fine, by changing szWmsLayer and CustomWMSURL vars.
通过更改 szWmsLayer 和 CustomWMSURL 变量,它工作正常。
回答by radioman
you need to trace tile urls using fiddler, then copy existing map provider class and modify urlformat, unless this provider use some esoteric projection, thats it, otherwise you need to know the projection details and make a custom projection class, check the source at https://greatmaps.codeplex.com/SourceControl/latestor github.
您需要使用 fiddler 跟踪 tile url,然后复制现有的地图提供程序类并修改 urlformat,除非此提供程序使用一些深奥的投影,仅此而已,否则您需要了解投影详细信息并制作自定义投影类,请在https查看源://greatmaps.codeplex.com/SourceControl/latest或 github。


