Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to trace routes in map | GMap.net | VB.net #184

Open
Tecoest opened this issue May 3, 2022 · 0 comments
Open

Unable to trace routes in map | GMap.net | VB.net #184

Tecoest opened this issue May 3, 2022 · 0 comments

Comments

@Tecoest
Copy link

Tecoest commented May 3, 2022

Hi,
I'm facing a issue where i'm unable to trace routes using any map provider I've chosen, I must be doing something wrong......

Using Google maps I can set markers and create poligons but when I create a route I get status "Request Denied" already tried using API keys and using code to replace URL's from http to https but i still get request denied... Also when i try using a diferent route provider MP needs a few seconds to process but returns empty variable

This is the code I'm using

        GMapW.MapProvider = GoogleMapProvider.Instance
        GMapW.Position = New PointLatLng(40.654331, -73.917067)
        Dim RP As RoutingProvider = DirectCast(GMapW.MapProvider, RoutingProvider)
        Dim P1 As New PointLatLng(40.657161, -73.921079)
        Dim P2 As New PointLatLng(40.65587, -73.915188)
        Dim MP As MapRoute = RP.GetRoute(P1, P2, True, False, Convert.ToInt32(GMapW.Zoom))
        Dim R As New GMap.NET.WindowsForms.GMapRoute(MP.Points, "Route")
        Dim SB As New SolidBrush(Color.FromArgb(125, 0, 255, 0))
        R.Stroke = New Pen(SB, 6)
        Dim mOverlayRoutes = New GMapOverlay("Routes")
        mOverlayRoutes.Routes.Add(R)
        GMapW.Overlays.Add(mOverlayRoutes)

Any tips apreciated...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant