GMap.Net can run at window mobile?

Topics: Windows Mobile
Oct 8, 2009 at 3:12 AM

GMap.Net can run at window mobile?

and GMap.Net read local filedata?

Coordinator
Oct 8, 2009 at 3:49 PM

there is patch for mobile, it works but i just beginning to invest more time on that platform ;}

the plan is :}

 

GMap.NET - Great Maps for Windows Forms & Presentation & Mobile

 

Oct 8, 2009 at 6:14 PM

Yes, we gota go mobile! :D  Where is the patch, it is available in CVS already? 

Coordinator
Oct 8, 2009 at 6:51 PM

cvs? ;} ..its on the patch list: http://greatmaps.codeplex.com/SourceControl/PatchList.aspx

Oct 9, 2009 at 1:08 AM

Great, let me give it a try. Thanks radioman! 

 

Coordinator
Nov 29, 2009 at 4:05 PM
Edited Dec 20, 2009 at 7:04 PM

YES, YES yes! :} i got my mobile, big screen(4.3-inch pixel-packed WVGA (480x800) display), perfect for maps! The new journey begins Now! ..Engage ;}

Coordinator
Dec 5, 2009 at 9:41 PM

testing gps, works  perfectly ;}

Coordinator
Dec 20, 2009 at 7:03 PM

there left only few corrections and "we go mobile" ;}

Coordinator
Dec 21, 2009 at 8:19 PM

"Steady as she goes Mr. Sulu." ;} Engage!

Coordinator
Dec 23, 2009 at 7:09 PM
Edited Apr 19, 2010 at 4:30 PM

implemented double buffer! integrated gps info! at warp speed 9 :}

 thats integrated public transport system of vilnius

Jan 5, 2010 at 12:32 PM

Fantastic job!!! Just asome and perfect for my needs (whtch is norwegian topo maps on my HD2).

Nice idea to have zoom on volume buttons, but personally I prefere simple tap-zones on display. Made class TouchMapControl withch inherits from GMapControl for this purpose.

My only consern is stabillity. Have not got time to debug it , but it's related to reading tiles. Far to often I've get the blue '..have imagery at this zoo..'. and just white in ServerOnly mode.  Assume there are some heavy loops going on because the unit somtimes becomes quite hot  while nothing happens.

Anyone share the same problem ? Any tips of where start debugging?

Coordinator
Jan 5, 2010 at 12:49 PM
Edited Jan 5, 2010 at 6:12 PM

Thx, Cache mode runs perfectly, but ...the problem is with http, i get only System.Net.WebException: The remote server returned an error: (404) Not Found. in request.GetResponse() at GMap.NET.GMaps.GetImageFrom, the same on emulator and on real device ;/.

p.s. i think i fixed it,  any confirm?

Jan 6, 2010 at 9:46 PM

Improved but not fixed. ServerAndCahce mode works quite good in the beginning but slows down so that even memory cashed tiles becomes blank. Even cache mode sometimes fail to present any tiles for my slightly modified app. This is probably my fault since the demo app seems to be perfect. ;-)

Any tips for how to enable and read the debug trace on on the HD2 device?

Coordinator
Jan 6, 2010 at 9:55 PM

hm... what do you mean read the debug trace?

Jan 7, 2010 at 6:51 AM

In the code system.diagnostic.debug.writeline is used. The .NET Compact Framework does not support tracing features that use a configuration file as i'm used to. But I found out that this simple way works OK: <font size="2">

 

</font>

 Trace.Listeners.Add(new TextWriterTraceListener("debuglog.txt"));
 Trace.AutoFlush = true;
 Trace.WriteLine("Entering MainForm");

Jan 12, 2010 at 9:44 AM

I finally found the problem causing instability after loading many tiles: The HD2 got out-of-memory at around 15MB. By changing  KiberTileCache.Add  method

from:
       if (MemoryCacheSize > MemoryCacheCapacity)
to:
      while (MemoryCacheSize > MemoryCacheCapacity)

the memory stays within the 5MB as reqested. My biggest headache disappeared! :-D

Coordinator
Jan 12, 2010 at 11:22 AM

are you sure?, on desktop it does not go out of requested size much ;/

Jan 12, 2010 at 11:54 AM
Edited Jan 12, 2010 at 11:55 AM

Quite sure, but I'm not sure why. Maybe the first tiles loaded are small (less detailed) and free one does not compensate for loading another more detailed (more bytes)? Take a look at task manager at you HD2.

Coordinator
Jan 12, 2010 at 12:00 PM

yes, but max overload is the max size of some tile, so if you set 2MB limit, you can hit 2.5MB at some !ideal point, but no more, but i'll test on my mobile too to be sure

Coordinator
Jan 12, 2010 at 6:03 PM

just tested, i decreased memory cache to 2MB on mobile, and it was quite stable, if there are some leaks, they are somewhere else, can you check again?

Jan 12, 2010 at 7:58 PM

did some more testing in server/cashe mode and I reached 15MB again (it took much longer time now thought.). so yes, there is some other mem leak.  seems like cache mode was stable when I tested earlier today. I'll investigate futher, but i'm quite bussy next days. (I probably should be carefull to call it memory leakage, since the garbage collector is not alway my best buddy;)

Coordinator
Jan 12, 2010 at 8:06 PM

i see, hm...

Jan 13, 2010 at 11:45 AM
Edited Jan 13, 2010 at 1:45 PM

This is why I've got out of mem in cache mode: MemoryCacheSize slowly rise to 3.2MB (!?) with limit set to 2GB, but when I change maptype (from jpg to png) all ~66 tiles will one by one be replaced with bigger -> over 7MB -> out-of-mem. I'll stick to the while loop. (I can still get problems if I "stress pan" a lot, but assume that's memory related to number of threads)

 

 

Coordinator
Jan 13, 2010 at 4:19 PM

yeah, finally i saw it with my own eyes ;] and fixed

Jan 14, 2010 at 3:57 AM

Hi everybody/ i have a question ... is Gmap.Net for .net compact static or dynamic ??

Coordinator
Jan 14, 2010 at 4:20 AM

what do you mean static/dynamic?

Jan 14, 2010 at 10:34 AM

i mean is it static (using Static Maps API http://code.google.com/apis/maps/documentation/staticmaps/) or dynamic like the one using javascript API ??

in static map i can't move the map with my finger left and right .... i just send a URL with my location and recevie a bitmap with fixed resolution ... the dynamic map like the original Google maps for windows mobile .. so what type of map is this ??

Coordinator
Jan 14, 2010 at 11:19 AM

then sure dynamic, don't you try desktop version? ;/

Jan 16, 2010 at 10:51 AM

Seems great !

When will the mobile version be released ?

Coordinator
Jan 16, 2010 at 3:00 PM

check svn, i don't want publish cab maked with visual studio which i can't install because some crap of certificates... ;] But you can directly deploy it from visual studio. Any ideas?

Jan 16, 2010 at 4:46 PM

Thank you man ... i just tried GMpas.NET windows mobile ... and it rocks :D .. this is the video http://www.youtube.com/watch?v=7IZDLpfhO3Y ..

now i have a question about the map key ... is it limited by (size - number of requested maps) in the day ?

Coordinator
Jan 16, 2010 at 4:55 PM

the key is needed only for geocoding(and yes they give you limited request count), tile access is unlimited, and you only get them once, because of local cache, you can prepare your whole city cache with integrated prefetcher in demos.

Jan 16, 2010 at 9:31 PM

 

It doesnt work on my htc hd2 !

I tried to run : GMap.NET.WindowsPresentation.

The file 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicToken=31BF3856AD364E35' cannot be found.

Any help would be appreciated !

 

Coordinator
Jan 16, 2010 at 9:34 PM

why do you suppose it should work? ;}

Jan 16, 2010 at 9:36 PM
Edited Jan 16, 2010 at 9:47 PM

 

ok, ok, i'm a noob ;)

Which one is supposed to run on windows mobile ?

Coordinator
Jan 16, 2010 at 9:59 PM

i guest Demo.WindowsMobile ;}

Coordinator
Jan 16, 2010 at 10:02 PM

...still sometimes on intense scrolling fails to load tiles ;/ Any optimizations/fix welcome indeed! ;}

Jan 18, 2010 at 8:22 AM
radioman wrote:

...still sometimes on intense scrolling fails to load tiles ;/ Any optimizations/fix welcome indeed! ;}

 haven't looked into it, but do you think it has something to do with the CF limitation of max 25 threads? Is it handled?

Coordinator
Jan 18, 2010 at 9:19 AM

..hm

Jan 19, 2010 at 1:44 PM

Small bug in GMapOverlay.DrawRoutes  for mobile: Counter 'i' is forgotten in "pnts[pnts.Length - 1 - i ] = p2;".  

Coordinator
Jan 19, 2010 at 4:08 PM

fixed

Jan 20, 2010 at 3:37 PM

Hi,

I have tried using the Mobile version on my HTC Diamond 2. It works ok but it is very slow! I downloaded the latest version 45699 from the source code. Is everyone else experiencing this? The tiles also sometimes don't load and you get a white area.

The windows desktop version doesn't seem to suffer from these problems.

 

Coordinator
Jan 20, 2010 at 3:45 PM

build release, use prefetched cache, get new htc-hd2 with 1GHz cpu ;}

Jan 20, 2010 at 8:07 PM
radioman wrote:

i guest Demo.WindowsMobile ;}

Ok, but how do you install it on the phone ?

 

Coordinator
Jan 20, 2010 at 8:10 PM
  1. build->Rebuild
  2. build->Deploy
Jan 22, 2010 at 9:09 PM

every time i open WM Demo i have  this message

http://i47.tinypic.com/14v04mb.jpg

 

what's the problem ??

Coordinator
Jan 23, 2010 at 9:49 PM

because design mode check doesn't work, any olutions?

Coordinator
Feb 11, 2010 at 8:04 PM

last build real speed on my mobile

http://www.youtube.com/watch?v=ffy3vpchRzA

Feb 16, 2010 at 1:10 PM

Hi,

thanks for great job,

i have a question,i want to put some placemarks in mobile version,is it possible?

(i'm using web service and in some situations,i want to add some palcemarks in retrieved lat longs from the web service)

thanks in advance

 

Coordinator
Feb 16, 2010 at 1:12 PM
Edited Mar 11, 2010 at 2:35 PM

yes, markers are working.

p.s. and now there is transparency support!

Apr 16, 2010 at 8:29 PM

Hello,

I'm trying to integrate GMap.net into my C# mobile app. Here is the code I have but no matter what all I ever get is the text at the bottom for the map
type I try. I never get any maps to show. I've tried different modes and map types but no images. What am I missing in the code below?

map = new GMapControl(); map.Dock = DockStyle.Fill; Controls.Add(map); map.Manager.Mode = AccessMode.ServerOnly; map.CanDragMap = true; map.MapType = GMap.NET.MapType.GoogleMap; map.MinZoom = 1; map.MaxZoom = 11; map.Zoom = map.MinZoom + 1; map.ShowTileGridLines = false; map.CurrentPosition = new PointLatLng(30, -100); map.ReloadMap();

Thanks,

Will

Coordinator
Apr 16, 2010 at 8:44 PM
Edited Apr 16, 2010 at 8:52 PM

where in the demos do you see this:

map = new GMapControl();
map.Dock = DockStyle.Fill;
Controls.Add(map);

;}

p.s. anyway, it works if you do it in the form constructor

Apr 16, 2010 at 9:05 PM

Thanks for the reply. It is in the form constructor and I changed it to mirror the demo as close as possible:

 

            map = new GMapControl();
            map.BackColor = System.Drawing.Color.White;
            map.CanDragMap = true;
            map.Dock = System.Windows.Forms.DockStyle.Fill;
            map.Location = new System.Drawing.Point(0, 0);
            map.MapType = GMap.NET.MapType.GoogleMap;
            map.MarkersEnabled = true;
            map.Name = "MainMap";
            map.RoutesEnabled = true;
            map.ShowTileGridLines = false;
            map.Size = new System.Drawing.Size(480, 696);
            map.TabIndex = 0;
            map.Zoom = 0;
            this.Controls.Add(map);

 

But I still get no maps. Any other advice you have is appreciated.

Apr 16, 2010 at 9:16 PM

Here is the full source. I'm trying to keep it simple but I don't see what I'm missing.

 

using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Samples.Location;
using GMap.NET;
using GMap.NET.WindowsForms;

namespace DeviceRunner
{
    public partial class Form2 : Form
    {
        private GMapControl map;
        public Form2()
        {
            InitializeComponent();

            map = new GMapControl();
            map.BackColor = System.Drawing.Color.White;
            map.CanDragMap = true;
            map.Dock = System.Windows.Forms.DockStyle.Fill;
            map.Location = new System.Drawing.Point(0, 0);
            map.MapType = GMap.NET.MapType.GoogleMap;
            map.MarkersEnabled = true;
            map.Name = "MainMap";
            map.RoutesEnabled = true;
            map.ShowTileGridLines = false;
            map.Size = new System.Drawing.Size(480, 696);
            map.TabIndex = 0;
            map.Zoom = 0;
            this.Controls.Add(map);
        }

        private void Form2_Load(object sender, EventArgs e)
        {

            GMapOverlay routes = new GMapOverlay(map, "routes");
            map.Overlays.Add(routes);

            GMapOverlay objects = new GMapOverlay(map, "objects");
            map.Overlays.Add(objects);

            GMapOverlay top = new GMapOverlay(map, "top");
            map.Overlays.Add(top);
            
            map.Manager.Mode = AccessMode.ServerAndCache;
            map.MapType = GMap.NET.MapType.YahooMap;
            map.MinZoom = 1;
            map.MaxZoom = 11;
            map.Zoom = map.MinZoom + 1;


            map.CurrentPosition = new PointLatLng(39, -105);
            map.ReloadMap();
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            map.CurrentPosition = new PointLatLng(39, -105);
            map.ReloadMap();
        }
    }
}

 

Coordinator
Apr 16, 2010 at 9:45 PM

well, you miss quite nothing, it should work perfectly

Apr 16, 2010 at 10:00 PM

I'll keep working on it. Its odd too, the demo works sometimes and sometimes it doesn't. Yahoo maps is the only map I've got to work in the demo.

Coordinator
Apr 16, 2010 at 10:07 PM

old version?

Apr 16, 2010 at 10:14 PM

I got it out of SVN this week. Any debug or log files that would help?

Coordinator
Apr 16, 2010 at 10:35 PM

so what you got?

Apr 16, 2010 at 10:36 PM

I'll have to work on this on Monday again. I'll let you know what I find.

Apr 19, 2010 at 2:33 PM

I got it to work over the weekend. I was missing the dlls for data and sql lite. Some times the tiles are slow to load,

have you noticed one map type to be better than others? Or have you noticed any other way to speed up the loading of tiles?

Coordinator
Apr 19, 2010 at 3:46 PM

just preftech cache on desktop and use it on mobile sd card, then it loads fast ;}

Nov 5, 2010 at 8:05 AM

Could you explain for dummies, how to instal this wonderful program in to windows mobile? It is user friendly mode, like with windows demo? 

BTW you have big balls man, i realy like your work!

Coordinator
Nov 5, 2010 at 11:51 AM
  1. check http://greatmaps.codeplex.com/Thread/View.aspx?ThreadId=228619
  2. build & deploy
Nov 5, 2010 at 12:45 PM

Hello radioman

Great work you have done. Just one question regarding GPS. I added the Fakegps to my emulator and started it. After running GMap I go to Page -> GPS but it does not seem to work. I just become a blue screen with a Loading message. Any Idea how I can get GPS to work? Thanks

Coordinator
Nov 5, 2010 at 12:48 PM

i guess, try real gps, not emulator

Nov 5, 2010 at 7:59 PM
Edited Nov 5, 2010 at 8:08 PM

What program shud i use? i tried visual studio 2010 with no success.. it tries to convert, but writes "The project file 'C:\Documents and Settings\.........\greatmaps_2b200490367c\Demo.WindowsMobile\Demo.WindowsMobile.csproj' cannot be opened. The project type is not supported by this installation." shud i use visual studio 2008 or something else?

I tried to publish "Demo.WindowsPresentation" and it works. Shud i use another program, or to do in other way?.  Or mabye my hands are booth left? :)

Mabye you could do mobile demo cab or something already compiled, what can be instaled like windows programs in your "download" page? It would be so cool to use your program with windows mobile in the forest :)

Coordinator
Nov 5, 2010 at 10:30 PM

visual studio 2010 has no support for mobile <= 6.5, only vs2008 works, and i've tried to make cabs, but certificate nonsense does not allow to install it... or smth... ;}

"...why we make world so 'difficult', i guess after billions of years of evolution humans are still nuts ;]"

Dec 30, 2010 at 10:43 PM

Dude, vs08 doesn't seem to work either. Could you at your convenience drop that mysterium around (that you seem to enjoy btw) and explain clearly how to install your fancy soft to our windows mobile-phones.

Coordinator
Dec 31, 2010 at 1:13 PM
Edited Sep 10, 2011 at 10:02 PM

VS9 works perfectly, all you need is mobile 6.5 sdk, there are no any secrets ;}

Sep 13, 2011 at 10:41 AM

Hi All,

I have put this onto my HD2 and it works great except I am hitting the 18.5mb memory size and it's showing the blue tiles. The only dll i can't load is the SQLite.Interop.074 but that's not referenced in the demo version that i can see. Any ideas please? By the way did the map bearing ever get resolved?

Sep 13, 2011 at 11:04 AM

Just checked the Mobile demo and it hit 19mb on that so did the memory issue ever get done?

Coordinator
Sep 13, 2011 at 11:15 AM

use release build for lover memory usage, it uses 5MB at the start, and keeps ~ 10MB after using

demo adds Interop dll as content file, because sqlite managed dll use it

by default demo cache mode is CacheOnly, so if your cache is empty you see nothing ;} prefetch some data or turn ServerAndCache mode, but it's not the most performant mode

personaly i use ~1GB cache of my city and few layers of whole country, keep large database in separate file for speed.

...and bearing maps requires gdi transformations, framework doesn't support it, the only option is workarounds, so far haven't invested much time into this...

Sep 13, 2011 at 11:26 AM

Hi Radioman, I am using CacheOnly as i have prefetched some data. I know it's a stupid question but i downloaded the code here http://greatmaps.codeplex.com/SourceControl/list/changesets and compiled the dll's :-) I actually worked out how to compile c code! so where is the release version? I had to make another dll inside gmap.net and called hookkey as it wouldn't work otherwise in VB so I need to be careful not to lose that.

As usual thanks for your efforts!

Sep 13, 2011 at 11:29 AM

Once I get the prefetched data I will come back to you on how to use 2 maps, as I have no idea on how to go about it :-(

Sep 13, 2011 at 11:42 AM

The KiberTileCache i am compiling has this in it so i thought it would be the one:-

#if

!PocketPC

public int MemoryCacheCapacity = 22;

#else

 public int MemoryCacheCapacity = 3;

#endif

Coordinator
Sep 13, 2011 at 11:42 AM

open GMap.NET.sln using vs2008, set target to Release, and build GMap.NET.WindowsMobile & Demo.WindowsMobile, deploy, that's it

p.s. i don't know if latest version actually works good on mobile, it can be out of cync, i'll check it tonight

Sep 13, 2011 at 12:03 PM

thanks radioman,

just a quicky, if i prefetch more than once, would the previous one be overwritten at some point or would the data.gmdb just grow?

Coordinator
Sep 13, 2011 at 12:07 PM

grow if you add new tiles, unless you manually delete some tiles

Sep 13, 2011 at 1:25 PM

Hi radioman, when i use the dll in my vb project the memory never drops down to below 15mb so soon fills up again to aroung 18mb, i am definately using the correct dll so do i have to tell it that it's a mobile or something in my code? I can't see anything in your demo source code?

Sep 13, 2011 at 3:59 PM

Hi Radioman, found the problem :-

mainmap.LevelsKeepInMemmory = 5

Now set to 1 :-), now all i need to to is find out why the touch screen freezes, must be something to do with the hookkey 

Coordinator
Sep 13, 2011 at 6:25 PM

i've just tested latest changeset, builds file, runs fine, memory is pretty stable, map drags fine, zoom keys works fine too

status: acceptable ;}

does freezo catch you in release or in debug mode and if so can you paste the stacktrace?

p.s. LevelsKeepInMemmory = 1; by default on mobile

Sep 13, 2011 at 7:17 PM

HI Radioman, when it freezes, it locks up phone so have to take battery out. It has bombed out a few times so will install the error messaging bit and paste here but I think it's got something to do with my webservice bit.

One thing i have noticed is it takes a long time to show the first map sometimes when on start up even in cacheonly mode, is the database automatically indexed?

If i had zoom level 17 in a city and drove out of the city where I had zoom level of 16 and had centreandzoom to my marker then that would show the blue tiles because i would still be on 17 instead of 16? Would it be possible for the programe to know when no markers are available on the current zoom level so i could zoom out a level? Or even better zoom out to a level that had markers so even it only had markers on level 12 it would zoom out from 17 to 12?

Thanks

Coordinator
Sep 13, 2011 at 7:46 PM
Edited Sep 13, 2011 at 7:49 PM

so you even can't click on start menu? For me sometimes map stuck(2 times in a year ;}), but i click start and using task manager terminate process, whole phone was never stuck

defrag sd card, before putting file in card, optimize data using function in map.Manager.Optimize or with SQLiteSpy, and use some other name than data.gmdb

Sep 13, 2011 at 7:50 PM

Nope, BUT i just put in a new gmdb and it took a while but restarted a few more times and all ok, also i put my webservice inside a function and all is good so far :-) The time still worked on the phone but the touch screen wouldnt work so the program froze not the actual phone. I'm pointing to my webservice not your coding. Any ideas on the zoom to level with tiles in?

Coordinator
Sep 13, 2011 at 7:59 PM

nop ;}

Sep 13, 2011 at 8:10 PM

No problem, looks like i'm going to have to get my hands dirty with this 'C' language :-) All it will be if a true of false if any tiles on the screen are blue, will look into it and post my findings.

Thanks for your help

Dec 15, 2012 at 10:07 PM
Edited Dec 15, 2012 at 10:07 PM
radioman wrote:

i guest Demo.WindowsMobile ;}


Where to download the Mobile version please?

 

Thanks in advanced

Coordinator
Jan 3, 2013 at 8:24 PM

source, manual build

Feb 7, 2013 at 5:12 AM
Edited Feb 7, 2013 at 5:16 AM
Develop environment:VS2008 + .NET CF 3.5 + Windows Mobile 6.0 Professional.The map can displayed correctly,but the path between two points is empty. By setting breakpoints start and end variables have value, but the value of route is null. The codes:
 MapRoute route = GMaps.Instance.GetRouteBetweenPoints(start, end, false, (int)map.Zoom);
       if (route != null)
       {
           GMapRoute item = new GMapRoute(route.Points, route.Name);
           //item.Color = Color.Blue;
           routes.Routes.Add(item);
           map.ZoomAndCenterRoute(item);
       }
Is this the old version? what 's the new version? Thanks .
Coordinator
Feb 7, 2013 at 8:27 AM
yes, check the source/download tab
Feb 7, 2013 at 2:56 PM
Edited Feb 7, 2013 at 3:01 PM
Idownloaded the new version.but I can't find where is wrong.I didn't find the difference. start and end variables have value, but the value of route is null. Thanks.
Coordinator
Feb 7, 2013 at 3:28 PM
nothing is wrong
Dec 19, 2013 at 7:56 AM
Hi radioMan
                 Is this require internet connection to display maps. or Having inbuilt maps . I want to develop app for Tablet having windows 7   ,Tablet having gps . but not internet connection ? I want to display longitude latitude , and my location in my application how i achieved that .  work for wpf also?
Coordinator
Dec 19, 2013 at 8:39 AM
use cache only mode