|
First of all : thank you so much for this very useful component. (I don't understand people who are not happy with your stuff !!!, maybe not developpers )
But some documentation will be welcome (or an "How To" document)
About this post :
I have integrated the GMAP control to an existing project. I had to change target to x86 to make it work.
Do you think that changing the target can have an impact on my application ?
x86 applications will be compatible within next Windows versions ?
My goal is to have an application that is compatible from Windows Xp to Windows 7 and next...
Ric
|
|
|
|
|
x86 target is most compatible, works on any cpu, ..and about documentation it's a bit to early, things keep changing, and i have only one mans power limited by this time eating life ;}
d{^__^}b - it's time to fly
|
|
|
|
|
now it works on any target
d{^__^}b - it's time to fly
|
|
|
|
|
No documentation. Only one demo that doesn't help.
This is not an article.
|
|
|
|
|
"Observe how people slyly suggest their importance, as when complaining over the many phone calls they receive."
d{^__^}b - it's time to fly
|
|
|
|
|
Dear radioman ,
First of all , Thanks so much . for this control . It really works like Magic . I do not know really how someone idiot like the guy from the previous post was not convinced about such great tool . Thanks again .
I would like to know if the control support caching the maps into separate tiles that are save separately into the hard-disk . I know that it took you much time to save the images into SQLlite database , but the problem is that when working with the images stored into the SQLlite database file , it is much slower that when the images are saved as standalone separate image files.
This is case as a program called GMapCatcher , although your program is much much much better .
Thanks
WSN
|
|
|
|
|
hey, thanks ;} ..actually file based cache is slower because it creates far to many files(in my current db there is 32000 tiles) and slow down whole hdd, ...anyhow, if you still want to save raw images, you can easily create your own file based cache provider
d{^__^}b - it's time to fly
|
|
|
|
|
Ok , It seems good for me to use your approach . But I have another issue , how large does the database handle. ie , can I use it to store data for an area of 100 Km x 100 Km at all zooms ( 1-20 ) . I noticed that the database can hold only 22 MB .
Also , If I plan to do my file cashing code , may you please give me "JUST GENERAL GUIDELINES" of how to do this . I am not professional as you , I know you do not have enough time to "DO THE JOB" for everyone .
Thank you in advance for your support.
|
|
|
|
|
database can hold as much as your hard drive can hold, there is no limit, 22MB is memory cache ;}
d{^__^}b - it's time to fly
|
|
|
|
|
Radioman, you started with a great idea, and you even developed it a bit, but why the f@*k did you stop halfway? and your libraries don't effing work either. Without the codee, there no way to fix it. Your sh*t is just unusable, that's just the sad truth.
|
|
|
|
|
the sad truth is, that You suck
d{^__^}b - it's time to fly
|
|
|
|
|
"Beware the bearers of FALSE gifts & their BROKEN PROMISES.Much PAIN But Still time. There is GOOD out there."
d{^__^}b - it's time to fly
|
|
|
|
|
Congrats, Sam, you're a jerk AND you don't know what you're talking about. This works great for me in Windows and on Windows Mobile. Even if it didn't work, why would you post a flame like this? Way to help out the community with that constructive criticism....
Thanks, Radioman!
|
|
|
|
|
I really leaned a lot from your work and GPS applications in general.
|
|
|
|
|
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
|
|
|
|
|