GMap.NET.GMapControl with custom map provider?
Asked Answered
A

2

6

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

Alten answered 17/5, 2016 at 6:11 Comment(0)
W
3

There is a WMSProvider class in:

WMSProvider

It works fine, by changing szWmsLayer and CustomWMSURL vars.

Wainscoting answered 5/6, 2017 at 10:26 Comment(1)
Yeahh,. I posted only to help other users with the same question🤗 – Wainscoting
E
3

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.

Earthshaking answered 17/5, 2016 at 20:29 Comment(1)
Thanks. Can I find some guideline for this? Or some example? – Alten
W
3

There is a WMSProvider class in:

WMSProvider

It works fine, by changing szWmsLayer and CustomWMSURL vars.

Wainscoting answered 5/6, 2017 at 10:26 Comment(1)
Yeahh,. I posted only to help other users with the same question🤗 – Wainscoting

© 2022 - 2024 — McMap. All rights reserved.