Map Control

S

Scott Gifford

Hello,

Can anybody recommend a .NET Compact Framework control to display a
roadmap in a mobile app, similar to Google Maps? Free or commercial
is OK. I have looked quite a bit, but have only found a few options,
and they all have some issues. I was surprised; it seems like this
would be a common control to want, and I expected the big mapping
providers to have a high-quality drop-in GUI component for sale, but
they didn't seem to.

Thanks for any advice!

----Scott.
 
S

Simon Hart [MVP]

Have you considered using the mappoint web service from Microsoft (not free -
sadly). Of course an internet connection is required on the device.
 
M

Michael Rubinstein

Scott, WebBrowser control can display Google Maps. Take a look at
http://code.google.com/apis/maps/documentation/staticmaps/ . Drop a
WebBrowser control onto a form and do something like this in one of your
methods:
this.webBrowser1.Navigate(new Uri(this.buildGoogleRequestString()));

buildGoogleRequestString() here is just a wrapper that generates HTML code.
You could start by pasting the code from the above link and replacing the
Google Maps Key in it with your own. If you don't have the key, get it. This
part is simple. Passing coordinates is just string manipulation. To do
anything fancy with Goggle Maps you may need JavaScript enabled on the PDA.
The PDA I am working with - XV6800 does not allow it, or may be I just don't
know how. May be somebody here knows better.

Michael
 
S

Scott Gifford

Michael Rubinstein said:
Scott, WebBrowser control can display Google Maps. Take a look at
http://code.google.com/apis/maps/documentation/staticmaps/ . Drop a
WebBrowser control onto a form and do something like this in one of
your methods:
this.webBrowser1.Navigate(new Uri(this.buildGoogleRequestString()));

Thanks Michael,

I have looked at Google's new Static Maps feature, and that is what
we'll use if we don't find anything else. The docs say it will only
accept a limited number of requests per day, and we're concerned we
could run into those limits. We will also have to implement
scrolling, caching, displaying icons, and converting lat/lon to screen
coordinates and miles, but those are less painful than the request
limit.
buildGoogleRequestString() here is just a wrapper that generates HTML
code. You could start by pasting the code from the above link and
replacing the Google Maps Key in it with your own. If you don't have
the key, get it. This part is simple. Passing coordinates is just
string manipulation. To do anything fancy with Goggle Maps you may
need JavaScript enabled on the PDA. The PDA I am working with - XV6800
does not allow it, or may be I just don't know how. May be somebody
here knows better.

I tried, I couldn't get any of the dynamic scrollable maps to work on
Pocket IE or Opera.

Thanks again!

-----Scott.
 
S

Scott Gifford

Simon Hart said:
Have you considered using the mappoint web service from Microsoft
(not free - sadly). Of course an internet connection is required on
the device.

Thanks Simon,

We will have an Internet connection on the device, so that's
definitely a possibility. Is there a GUI component that will work on
the Compact Framework with MapPonit? If not, has anybody had
experience writing one? Did the MS Web Services API make it fairly
easy?

Thanks!

----Scott.
 
S

Simon Hart [MVP]

I am not aware of a GUI component for devices but that doesn't mean there
arn't any. The desktop version is named Virtual Earth control which is of
course very powerful. The mappoint web service is dead easy to use and is a
standard SOAP based service see here for some code examples:
http://msdn2.microsoft.com/en-us/library/aa492564.aspx. It simply downloads
"maps" or "tiles" of your required area and you pay per tile.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
 
C

Chris Tacke, eMVP

I wrote a POC application using the MapPoint Web Services when it first came
out and they were quite painless to use. I had a GPS-integrated mapping
application that drew historical routes and it took roughly 2 days to mock
up. IIRC the downside was it was somewhat expensive for low-volume usage,
but that was probably 5 years ago, so the state may have changed.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
D

Dick Grier

Hi,

Do a search for the article The MapPoint Web Service Helper - Pat II: Mobile
Application Development. The Helper should provide the methods that you
need.... And, MapPoint licensing has been updated, so it may not be too
expensive in a production application.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top