Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GMap.NET.GMapControl with custom map provider?

I want to use another map provider in my GMapControl.

For example, I can use GoogleMap:

GMapControl myMapControl = new GMapControl();
myMapControl.MapProvider = GMapProviders.GoogleMap;

All build-in map providers are stored in GMapProviders.

How can I add my custom GMapProvider?

I need to add 2Gis map provider.

enter image description here

like image 960
Binakot Avatar asked May 17 '16 06:05

Binakot


2 Answers

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/latest or github.

like image 110
radioman Avatar answered Sep 22 '22 00:09

radioman


There is a WMSProvider class in:

WMSProvider

It works fine, by changing szWmsLayer and CustomWMSURL vars.

like image 30
Juan Montero Avatar answered Sep 24 '22 00:09

Juan Montero