Code Monkey home page Code Monkey logo

judero01col / gmap.net Goto Github PK

View Code? Open in Web Editor NEW
436.0 436.0 195.0 17.09 MB

GMap.NET Windows Forms & Presentation is an excellent open source, powerful, free and cross-platform .NET control. Allows the use of routing, geocoding, directions and maps from Google, Yahoo!, Bing, OpenStreetMap, ArcGIS, Pergo, SigPac, Yendux, Mapy.cz, Maps.lt, iKarte.lv, NearMap, HereMap, CloudMade, WikiMapia, MapQuest and many more.

License: Other

C# 90.97% HTML 0.48% CSS 1.45% JavaScript 7.00% ASP.NET 0.10%

gmap.net's People

Contributors

akiskk avatar caalbasi avatar chrisg32 avatar jdeleondevgroup avatar jokubokla avatar judero01col avatar khao-soi avatar lukaszkn avatar marlond18 avatar ogretransporter avatar omidid avatar rododevr avatar shrayasr avatar w0mby avatar zgabi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmap.net's Issues

Bearing not working when using ScaleMode = fractional

Using Scalemode = fractional causes the bearing setting to have no effect. I can initially start with a bearing of let say 45 and zoom of 12 which will display correctly. Any zoom function after this will display at 0 degree bearing even if the bearing is set to 45 or any other value.

Any workaround for this?

Thanks.

Distance and Duration miscalculated

On the GoogleMapProvider the calculation of the Duration and Distance only applies for the first leg:

direction.DurationValue = (uint)DirectionResult.routes[0].legs[0].duration.value;
direction.DistanceValue = (uint)DirectionResult.routes[0].legs[0].distance.value;

also the steps
for (int i = 0; i < DirectionResult.routes[0].legs[0].steps.Count; i++)

It is giving me a very short time and distance because of this.

Openstreet map is very slow

Is it just me or osm got very slow?
What is more, sometimes tiles fail to load which means that it will not be saved.

And if the loading never ends then db caching never starts.

Aby ideas how to improve it?

getroute always return null

I am using the component for a few months and was working perfect... But now when I use the GMapProviders.OpenStreetMap.GetRoute function I get always null.

I have tested different providers and the same issue.

NullReferenceException in gmap.net

when i use gmap.net in windows forms, there are some exception i can catch, most of them is NullReferenceException, and stack is
GMap.NET.Internals.FastReaderWriterLock.AcquireWriterLock()
在 GMap.NET.Internals.Core.Dispose(Boolean disposing)
在 GMap.NET.Internals.Core.Finalize();
i really didn't find the solution,is anybody knows?thanks a lot!

NuGet Package Dependency

When I use nuget to install GMap.NET into my solution, and if I am using the GoogleMapsProvider, after I deploy/install my application, when I attempt to make a call to the Maps elevation API, or when I am trying to make a call to the Javascript Maps API, I get an exception.

"Could not load file or dependency Newtsonsoft.Json v9.0.0"...

The nuget package I download says that the library is compatible with Newtonsoft.Json >= 9.0.1 for v1.8.5. However, the library is looking for v9.0.0. I think the dependency needs to be updated in your nuspec file.

I also downloaded the source from github and compiled the libraries, then manually included them in my project after uninstalling GMap through nuget, but keeping the required depedencies. The version mismatch error went away.

REQUEST DENIED in getDirections()

Here's my VB.Net code:

Dim gd As New GDirections
GMapProviders.GoogleMap.ApiKey = "MY API KEY"
Dim xx As GMap.NET.DirectionsStatusCode = GMapProviders.GoogleMap.GetDirections(gd, startRoute.Position, endRoute.Position, False, False, False, False, True)

And the last line returns REQUEST_DENIED code (6). I'm 100% sure that api key is correct as I have no problem using it in Firefox.

Curved Path

Is there any possibility to create a GMapCurvedRoute file ?
GMapRoute is perfect but i was wondering if we can use AddCurve instead of AddLine
and DrawCurve instead of DrawLine.

Many Thanks in advance.
Ala'a

ASP.net MVC?

Hello,

Can you use GMap.NET för ASP.net MVC?

Thank you!

GMap C# Url change Price and few questions

Hello, I have few questions.

I have application which use google maps and geocoding / decoding address to gps or otherwise (using gps from link)

I have problem with "catching" url from external Webbrowser which looks can be fixed using this application

I'd like to implement function as "address x is on the map so if I click on other point url is changed and i can decode it again to get nearest address".

Does it also require using google geocoding api ( $$$ ).

OpenStreetMap works as RoutingProvider only in Europe, Africa and Asia

Hi,
My app is using GMap.net and I noticed the routing did not work in South America and North America.
As I use an older Version of the Control now I downloaded the actual Version 1.9 from GitHub but running the demo app there is the same Problem.

If I change the map Provider to Bing Routing is working in South America and North America too.
Can anybody explain why OSM Routing works in Europe but not in South America and North America.

GMapRoute only showing point to point distance not the actual route

Hello,
I'm using GMap.Net.Windows v1.9.3, for my university project where I need to show route from 1 address to another. But GMapRoute is not properly showing the route from 1 address to another. It is just showing point to point linear line. Is there any solution regarding this issue?
Here is my code for route,

        List<PointLatLng> points = new List<PointLatLng>();
        
        points.Add(new PointLatLng(48.866383, 2.323575));
        points.Add(new PointLatLng(48.466383, 2.523575));
        points.Add(new PointLatLng(48.866383, 2.723575));
        GMapRoute gr = new GMapRoute(points, "Route");

        
        
        GMapOverlay over = new GMapOverlay("routes");
        GMarkerGoogle marky = new GMarkerGoogle(new PointLatLng(48.866383, 2.723575), 
        GMarkerGoogleType.blue);
        over.Routes.Add(gr);
        GMapOverlay mar = new GMapOverlay("mar");
        mar.Markers.Add(marky);
        map.Overlays.Add(over);
        map.Overlays.Add(mar);

And here is the output I got.
issue

Not able to acces internet

When using no internet access message is thrown and maps not displayed.a proxy server is in use. this was working earlier.

How to dynamically change GMapMarker content using Timer?

I have a custom GMapMarker class that draws a simple image to map... How to make that image to change its properties (lets say blink) in interval of 500ms?

I could call GMapControl.Invalidate() from Timer. This will cause my entire map to redraw, which is not desirable. I only need my custom GMapMarker to redraw.

Is there any better solution for this? How about using internal Timer and call Redraw from marker itself? Is this possible?

Compatibility

Hi. I am new in UWP. I'm traying to program a simple app for Desktop and Mobile. Is it compatible with Windows 10 Universal Platform?

Is there any way to add a animated custom marker?

How to add a animated gif as a marker type? The below code doesn't throw any error, but the gif image is not actually animating. How to solve this issue?

       ```
        var overlay = new GMapOverlay("marker_overlay");
        var bmp = (Bitmap)Image.FromFile("marker-1.gif");
        var marker = new GMarkerGoogle(pos, bmp);
        overlay.Markers.Add(marker);
        gMapControl1.Overlays.Add(overlay);

GetDirections() throws json exception

I dont understand what am i doing wrong to be honest, GetDirections() is throwing a 'Newtonsoft.Json.JsonReaderException' in Newtonsoft.Json.dll
tried to upgrade my json version but that didnt do the trick

Caching Maps on NetWork Location Doesn't Work For All Map Providers.

When a Network Location ( example \\SERVER_C\Maps\ ) is specified as a CacheLocation for GmapControl GMDB, database is not created from the start and afterwards even if you copy database to its place, its not being accessed by the control for storing MapTile References. (Have in mind that Network folder sharing options are loose.)

As a Result centrilized cache not working and so traffic and cache builds up when multiple users access the map.
If CacheLocation is specified in local pc_client drive, CacheLocation Works FINE.!!!?
Any Ideas?
Please Help !

open street maps problem

Hello.

I have a problem with a function GetRoute that does not affect the value of Duration (it is always null, distance is ok) version 1.8.5

best regards

ACCESS_DENIED in GetPoint

When using

Dim LLL As List(Of PointLatLng) LLL = New List(Of PointLatLng) status = GMapProviders.BingMap.GetPoints(pm, LLL) If Err.Number <> 0 Or LLL Is Nothing Then Err.Clear() End If
pm is a placemarker with the address info I am looking for.

The status returned is ACCESS_DENIED.

Class

Can you show me how to edit the class? I have installed your framework version and it works good but I want don't see any class files. I want to be able to allow users to enter in an API key.

Map Tiles without Labels/Transit Lines/Highways

Hi @judero01col,

I am using your library to get map tiles which then get analysed. However, the presence of the labels, transit lines and highways on the map influences the image analysis results. I am calling GetImageFrom which in turn calls GetTileImage which then calls MakeTileImageUrl. I wanted to ask if there is a chance that the MakeTileImageURL function in GoogleMapProvider.cs could be replaced by the following:

string MakeTileImageUrl(GPoint pos, int zoom, string language, bool NoLabels = false, bool NoTransitLines = false, bool NoHighways = false)
    {
        string sec1 = string.Empty; // after &x=...
        string sec2 = string.Empty; // after &zoom=...
        GetSecureWords(pos, out sec1, out sec2);
        List<string> apistyles = new List<string>();
        if (NoLabels == true)
            apistyles.Add("s.t:0|s.e:l|p.v:off");
        if (NoTransitLines == true)
            apistyles.Add("s.t:65|s.e:g|p.v:off");
        if (NoHighways == true)
            apistyles.Add("s.t:49|s.e:g|p.v:off");
        string apistyle = string.Join(",", apistyles);
        return string.Format(UrlFormat, UrlFormatServer, GetServerNum(pos, 4), UrlFormatRequest, Version, language, pos.X, sec1, pos.Y, zoom, sec2, Server, apistyle);
    }

Is this feasible? If not, is there an existing method that allows me to achieve what i am trying to do.

Thanks,
Anthony

Cannot Create an instance of GMapControl - WPF Application Error

When I try to add GMapControl to my WPF Application, I'm getting an error saying
"Cannot Create an instance of GMapControl"
I'm also getting the following error message
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found.

How to solve this issue? I want to use GMap in my WPF application
Capture

WPF MapRoute disappears when zooming in

Greetings!

When I place a long route on the map. Route gets disappeared when I zoom in too close. I think it happens when one of the point get outside of the scope of known position on the map
Long route screen
51
Zoom at: 16
52
Zoom at: 18 disappears
53

The longer the route the less zoom needed to get route disappeared

MapInfo. Server apps.

Tell me, please, does GMap support MapInfo maps? And is it possible to write server applications on the GMap? Thank you ).

Gmap how to set Google ApiKey in WPF?

Hello everyone.
My program is on WPF and I need my Google ApiKey to use Directions API for creating routes.
In Windows Forms I use
GMap.NET.MapProviders.GMapProviders.GoogleMap.ApiKey="My ApiKey"
But I couldn't find how to do it in WPF. Please, help me.

Here Maps Slow

Hi,
We use Here Maps with the control. We have a HERE account and have passed the API Key and the APP key.

However, the map tiles are very slow to load. We also have caching enabled.

Is there any way to speed up the loading process?

Gmap WMS call

Greeting

I hope you are all good.

I need help with Gmap.net we have a satellite imagery provide that's not listed under GMapProviders. and we want to display their satellite imagery on Gmap.

How can i make a WMS call on Gmap.
and that WMS call must pass Authorization header when making the call

Thanks.

Help

I have never touched .NET but am wanting to use this build for my own project. Is there a simple way to set the search to only look within a state instead of the globe? How do I remove all the base map imagery layers I don't want? Is there a way to connect to custom layers in .CSV or .SHP?

Import/Open KML

Hi,
How can I open an existing KML file on maps? Is there any way.

Please help. Thank you!

Here maps error

Hi,

I was glad to see that there's still work in progress on this great project!
Nevertheless, here maps returns an error 400 Bad Request
The string e.g is
Address = {http://4.traffic.maps.cit.api.here.com/maptile/2.1/traffictile/newest/normal.day/16/34979/22632/256/png8?app_id=&app_code=}

Any ideas?

Cheers,

Stephan

Borderless Map?

Hey,

could it be possible to add an option for a bordeless mode of the map? Right now when drawing a line that would go over 180°W/E it is displayed over the the whole map....

Kai

in WPF, The Position dont work with double.Parse()

Problems while trying to pass double.Parse() values to Position property of the map component.
this works:
Window.Map.Position = new GMap.NET.PointLatLng(50.555, 4.999);
but this not:
Window.Map.Position = new GMap.NET.PointLatLng(double.Parse("50.555"), double.Parse("4.999"));
I have an old sqlite database where longitude and latitude are stored as string, so i'm a little disappointed. Is there a solution?

i cannot use GMap GroundOverlay in C#?

is there any possible I can use GMap GroundOverlay in C# bcuz Ive been searching for a months I cant see the answer. help me guys for my project! Thanks.

Get HereMAP address

How can I get the address of a GPS coordinate with a HereMap key?

map.MapProvider = GMapProviders.HereMap;
GMapProviders.HereMap.AppCode = "APPCODE";
GMapProviders.HereMap.AppId = "APPID";

GDirections gd = null;
DirectionsStatusCode Res = map.DirectionsProvider.GetDirections(out gd, map.Position, new PointLatLng(-12.0865435, -77.0284566), false, false, false, false, true);
if (Res == DirectionsStatusCode.OK)
{
MessageBox.Show(Res.ToString());
}

Serialization for multipolygon GMapControl.cs/GMapPolygon.cs

We implemented a set of changes to this version of GMap.NET to allow for the display of multipolygons, specifically polygons with sections removed. The changes can be viewed here:

https://github.com/Levrum/GMap.NET

This version needs updated serialization/deserialization code before it is ready to be considered for a pull request, but we have no need for it in our project, and our development team currently doesn't have time to work on it. If anyone is interested in implementing this functionality so the changes can be potentially integrated with the community version of GMap.NET, please feel free to use what we've written so far. Otherwise we will return to it and submit a pull request when our schedule allows.

Thanks for all your work in furthering the active development of GMap.NET.

Error 403 with OpenStreetMap

I get Error 403 (forbidden) when using openstreenmap provider. Think the user agent string is blocked. Can I specify my own unique user agent and HTTP referer?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.