|
thanks a lot for writing the article. I am just surfing the net and find your article. I'm dealing with a project that related to this article.
|
|
|
|
|
I've been looking for exactly this for ages, why don't you tell it into a commercial product, some help files and some support and you could be onto a winner!
Nice work and thanks for sharing!
Regards,
jim
|
|
|
|
|
well maybe ;} but with attached price i just can't be the Great winner
d{^__^}b - it's time to fly
|
|
|
|
|
Well if you do manage to find some time, how about a small help file? Would really add value to this project!
Jim
Regards,
jim
|
|
|
|
|
Your answer to this question is more awesome ^_^
Anyway, I liek your work. Because at firstly, I did everything by myself. Now, it's really great to see someone can post it as a .dll file to use ^^
thank you again ^^
|
|
|
|
|
Thanks for this great project with its free code.
I want to use it in a small application for analysing and editing gpx files recorded with my Garmin unit. Since I use a control of my own for editing/displaying, I cannot use the GMapControl. I soon found out that most of the communication with the map servers is done in the Core class, which I then changed from internal to public (and some other classes). I tested with a "small" window size, so that only one tile would be loaded. Strangely, two requests were always sent, and sometimes the EnqueueCacheTask of GMaps crashed...
The thing was that I always set position and zoom immediately after each other, and each set method causes the tiles to be requested from the server. Actually, the change required was very little since the Core class is already quite prepared for it with the "started" variable:
private bool _WasStarted;
public void BeginUpdate()
{
_WasStarted = started;
started = false;
}
public void EndUpdate()
{
started = _WasStarted;
if (started)
{
GoToCurrentPosition();
}
}
So I can simply do a BeginUpdate before setting the values, and a EndUpdate to start fetching the tiles.
Well, true, changing a class from internal to public actually means it is my fault that I had trouble...
Have a lot of success with the further development of this project!
|
|
|
|
|
well i have no crashes on my htc mobile, can you be more specific about what you experience?
d{^__^}b - it's time to fly
|
|
|
|
|
In the button click handler of a windows form (on an old single core computer running XP), I read the zoom and position values, set these two values in the Core object
_Core.Zoom = zoom;
_Core.CurrentPosition = new PointLatLng(latitude, longitude);
and then it starts two times to get the tile from Google.
Often the error is then
05.04.2010 10:21:43.9375, Thread=11 Core.UpdateBaunds()
OnTileLoadStart: 1 tiles to load at zoom 14, time: 10:21:43.9375000
05.04.2010 10:21:43 GMapDialog._Core_OnTileLoadStart
05.04.2010 10:21:43.9375, Thread=11 Core.UpdateBaunds is adding task 14 - {X=10326,Y=7695}
05.04.2010 10:21:43 GMapDialog._Core_OnNeedInvalidation
05.04.2010 10:21:43 GMapDialog._Core_OnMapDrag
05.04.2010 10:21:43 GMapDialog._Core_OnMapZoomChanged
05.04.2010 10:21:43 GMapDialog._Core_OnCurrentPositionChanged: point={Lat=10,85, Lng=46,9}
05.04.2010 10:21:43.9375, Thread=11 Core.UpdateBaunds()
OnTileLoadStart: 1 tiles to load at zoom 14, time: 10:21:43.9531250
05.04.2010 10:21:43 GMapDialog._Core_OnTileLoadStart
TileLoadQueue: 0
ProcessLoadTask: 14 - {X=10326,Y=7695}
05.04.2010 10:21:43.9531, Thread=8 Core.ProcessLoadTask calling GetImageFrom(type=GoogleSatellite, pos={X=10326,Y=7695}, zoom=14
Starting GetResponse: {X=10326,Y=7695}
05.04.2010 10:21:43.9531, Thread=11 Core.UpdateBaunds is adding task 14 - {X=10326,Y=7695}
05.04.2010 10:21:43 GMapDialog._Core_OnNeedInvalidation
05.04.2010 10:21:43 GMapDialog._Core_OnMapDrag
05.04.2010 10:21:43 GMapDialog._Core_OnCurrentPositionChanged: point={Lat=10,85, Lng=46,9}
TileLoadQueue: 0
ProcessLoadTask: 14 - {X=10326,Y=7695}
05.04.2010 10:21:43.9843, Thread=18 Core.ProcessLoadTask calling GetImageFrom(type=GoogleSatellite, pos={X=10326,Y=7695}, zoom=14
GetResponse OK: {X=10326,Y=7695}
Starting GetResponseStream: {X=10326,Y=7695}
GetResponseStream OK: {X=10326,Y=7695}
EnqueueCacheTask: {X=10326,Y=7695}
A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.dll
GetImageFrom: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Queue`1.Enqueue(T item)
at GMap.NET.GMaps.EnqueueCacheTask(CacheItemQueue task) in D:\Daten\Projects\GMap\GMap.NET\GMaps.cs:line 780
at GMap.NET.GMaps.GetImageFrom(MapType type, Point pos, Int32 zoom) in D:\Daten\Projects\GMap\GMap.NET\GMaps.cs:line 2193
ProcessLoadTask: 14 - {X=10326,Y=7695} -> empty tile, retry 0
05.04.2010 10:21:44.0937, Thread=8 Core.ProcessLoadTask calling GetImageFrom(type=GoogleSatellite, pos={X=10326,Y=7695}, zoom=14
OnTileLoadComplete: 160ms, MemoryCacheSize: 0,215575218200684MB
05.04.2010 10:21:44 GMapDialog._Core_OnTileLoadComplete
05.04.2010 10:21:44 GMapDialog._Core_OnNeedInvalidation
Starting GetResponse: {X=10326,Y=7695}
GetResponse OK: {X=10326,Y=7695}
Starting GetResponseStream: {X=10326,Y=7695}
GetResponseStream OK: {X=10326,Y=7695}
EnqueueCacheTask: {X=10326,Y=7695}
A first chance exception of type 'System.IndexOutOfRangeException' occurred in System.dll
GetImageFrom: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Queue`1.Enqueue(T item)
at GMap.NET.GMaps.EnqueueCacheTask(CacheItemQueue task) in D:\Daten\Projects\GMap\GMap.NET\GMaps.cs:line 780
at GMap.NET.GMaps.GetImageFrom(MapType type, Point pos, Int32 zoom) in D:\Daten\Projects\GMap\GMap.NET\GMaps.cs:line 2193
ProcessLoadTask: 14 - {X=10326,Y=7695} -> empty tile, retry 0
05.04.2010 10:21:44.2500, Thread=18 Core.ProcessLoadTask calling GetImageFrom(type=GoogleSatellite, pos={X=10326,Y=7695}, zoom=14
OnTileLoadComplete: 160ms, MemoryCacheSize: 0,215575218200684MB
05.04.2010 10:21:44 GMapDialog._Core_OnTileLoadComplete
05.04.2010 10:21:44 GMapDialog._Core_OnNeedInvalidation
The thread 0xdd8 has exited with code 0 (0x0).
The thread '<No Name>' (0xff4) has exited with code 0 (0x0).
With the additional BeginUpdate() and EndUpdate() functions above, the error does not happen. By the way, the error does not become visible to the user, it is only visible in the debug output. I added some further debug messages including the thread number, so I could find out where the problem was.
In the example above, thread 8 was initiated after changing the zoom, and thread 18 after changing the position, just 30 ms later.
|
|
|
|
|
are you using old version? Does this issue still exists?
d{^__^}b - it's time to fly
modified on Friday, April 9, 2010 4:09 AM
|
|
|
|
|
After installing the service packs for the .net framework, the error has gone - it was obviously a bug in the framework.
Nonetheless I'd suggest the BeginUpdate and EndUpdate fuctions for changing several parameters at once, as it is really not necessary to start the web request several times within a few milliseconds (faster than it can be replied).
|
|
|
|
|
maybe, but if you do it in reverse order it definitely loads less tiles:
_Core.CurrentPosition = new PointLatLng(latitude, longitude);
_Core.Zoom = zoom;
d{^__^}b - it's time to fly
|
|
|
|
|
How does stand with reguards to having to license the map data. E.G if you use this withi an app sold on the app store, surly tou would need and enterprose license agreement from Microsoft, and the same for Google.
|
|
|
|
|
you can use openstreetmap data free
d{^__^}b - it's time to fly
|
|
|
|
|
The probem with open street maps is the quality of the data, places names missing lack of detail (you get what you pay for). Your artical should include notices stating that licences will be required.
|
|
|
|
|
I know this is a year old but I thought I would add my bit. The last guys comment is correct. The authors attitude sucks. I've been programming for 10 years but find the way he has constructed this very weird. Dont even think about adding this to production software because if you have a problem and have to support it, all you will get from the author as help is stupid comments and ridiculous little icons.
As can been seen from the many sites asking for it.
Any other author would have produced an elementary help file or manual, but not this guy. Before you get your hopes up, try and find some documentation on it, and best of luck with that.
Also, there are other products out there that have been documentated properly and not left with "Its so easy, you just use it".
Should the author consider this post to be unfair, perhaps he would be so kind as to post a link, as a reply to this, to some proper documentation on the software. And by "proper documentation", I dont mean "Its easy you just do it". Perhaps he would like to take a look at some other authors software and see how documentation and help files should be done. If he has a problem with English, I'm sure I can make arrangements for someone to help.
I'm curious as to how he will try and pass this off with a silly comment
|
|
|
|
|
support is great as the project itself ;}~ happy using
d{^__^}b - it's time to fly
|
|
|
|
|
Yeah, thats just about what we expected
|
|
|
|
|
expect more
d{^__^}b - it's time to fly
|
|
|
|
|
Dude, then don't use it. lol. It's effing free so stop bitching. Would it be nice to have help docs, sure but your bad attitude towards this guy for not giving you documentation is BS. I swear some people expect way too much.. Here's an idea..get the code and learn it. If you're here trolling for projects to add to production software then that is your problem buddy and not the author's.
|
|
|
|
|
I couldn't agree more with you, "Member 3870100".
Radioman, thanks for your GREAT work, thanks for sharing and thanks for answering people's questions in this forum, which is part of the documentation -> I bookmarked this Codeproject page
|
|
|
|
|
|
Wow this is totally the wrong attitude and against the principles of this very website. What the author has done is make available his work. He is under no obligation to make things "easier" for you. You can sit down, look at the code, hope to learn something from it... or you can decide that it's not for you and move on. I don't see how berating his work is benefical to anyone.
|
|
|
|
|
This code is so self explanatory.
I managed to make quite deep changes to the code without even looking for documentation.
Have a nice life!!
|
|
|
|
|
Very little information and the demo does not work.
|
|
|
|
|
demos are working perfect, but codeproject article update system is via e-mail with extra dependencies of other people d{^__^}b - it's time to fly
|
|
|
|
|