• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help on developing Google Maps application

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fellow ranchers,

I am trying to develop a Google maps application for the Android platform. I have so far managed to implement basic geocoding, overlaying and simple map controls. Now I am stuck over implementing, 'plotting of points of interest 'on a map. All the examples I have seen over the internet, explain this in the terms of Google maps web service. I need to develop it on the Android platform. Also I came across a pdf , which states that it is not possible without 'hacking' in Gmaps(refer:link).

I also tried to get help from the Google API reference, provided with the sdk.

Can anyone guide me in the right direction(references, links etc.) to implent this?


Thanks in advance
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Google Maps API is JavaScript that allows you to take a Google Maps webpage and overlay stuff on it. That's in contrast to the Yahoo maps API, which redraws the whole image on their own servers and sends it out.

Well, Google Maps API does more than that, but that's one of its most popular features. So the easiest way would be to embed a webpage window to Google in you application and use the Javascript API (assuming that your target device can handle it).

Alternatively, you could fetch the Google images and overlay your own local API on a canvas, allowing for any legal constraints. That would require a bit more programming on you part, however.
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for the reply. I too think the method suggested by you (through overlays) is the only solution at sight. But if I intend to have many points of interests(POI) in my application, the amount of data I need to store on the device(latitude, longitude, address, etc. of the POIs) would be very high.

I was wondering if there was a way to dynamically get this data from the Google maps service itself, instead of providing it in my application(like it is done as simple search of a location on Google maps).

Hope you get my problem.
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not really certain what you're looking for, but if you've got a large and changeable collection of POI's, I'd definitely recommend keeping them somewhere besides the device, as long as the device can connect to whatever server you're getting them from in a reasonably timely manner. From the way you're talking, it sounds like you're looking for points that Google themselves considers "interesting", which means that you should be able to use AJAX or HTTP tunnelling to get the data you need. If you have your own collection, you can set up a server of your own along with a suitable web service API to deliver the data to you mobile app.
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I'm not really certain what you're looking for, but if you've got a large and changeable collection of POI's, I'd definitely recommend keeping them somewhere besides the device, as long as the device can connect to whatever server you're getting them from in a reasonably timely manner. From the way you're talking, it sounds like you're looking for points that Google themselves considers "interesting", which means that you should be able to use AJAX or HTTP tunnelling to get the data you need. If you have your own collection, you can set up a server of your own along with a suitable web service API to deliver the data to you mobile app.



Since, you have mentioned this allow me to add that this is already being used in Augmented Reality applications such as Wikitude and Layar; they use XML to represent and store data about POIs. They are also trying to standardize the format. Read about it here
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've done KML. It's a good thing to pair with REST services.
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was planning for a thick client application, but by your responses, it seems I would have to create a web service, to support this application.
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, as it happens, I was looking at the Android Widget gallery last night and as of Android 1.5, there's a Google Maps widget. Have you seen it?

Google maps itself is a "web service" in the sense that the image data comes from their servers. But if you mean for the Points of Interest, that's basically a matter of how much data you want to dump into the client device and how much trouble it would be to keep devices full of up-to-date data.
 
VineetK Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

I am basically trying to develop an application, which marks essential services(eg hospitals,schools etc.) within certain range of the device. For this I would have to keep detailed information of every place on the map(like latitude, longitude, info etc.), that is to be marked on the map.

Now if I have to prepare this application for a city, taking into account atleast 10 services, the amount of data that needs to be ready for use, is certainly not feasible to put on the device. Therefore I was thinking of developing a web service, just to serve information about the points of interset to the client application, on the device. The map part would still be retreived from the Gooogle maps web service, but the information about the POIs would be retreived from the web service.

Does this sound logical, or can there be a more efficient way to acheive this?
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

VineetK Singh wrote:Hi Tim,

Does this sound logical, or can there be a more efficient way to acheive this?



Sounds like what I'd do. I have a Bus Route system that operates like that. Gets the list of stops from the web server and uses Google Maps client-side javascript to flag the bus stops on the map and draw the route that connects them. That part of the app is presently desktop-based, but should be workable on an Android device.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic