Embed Google Map?
Pretty simple, I have an app where its going to load with some predefined map searches (for simplicity sake, just say "coffee shop") when it loads. Is there a way to embed the google maps results that you might get using the native app in a titanium app? Sounds like a simple app I know, but I'm looking at this for a starting point.
4 Answers
-
Josh,
What you are after is the Ti.Map class.
With it you can show a mapview and the add the annotations you like, in your case these would be the coffee shops, after you have requested and received the relevant information from your webservice of choice.Check out the kitckensink app if you haven't already, it has many useful snippets of code you could reuse.
Cheers,
Angus -
Yea, doesn't really help, I'm basically looking to parse a list of google map results and drop pins. The sample doesnt show any looping, parsing, or anything..
-
Use a WebView and just post the embed code from Google Maps?
-
I think you'll have to use an external API to get the search results you're looking for, then add these results as annotations to a MapView. I'm not sure what API service the iPhone uses but for starters you should look into the Yelp Search API or the Google Places API. I think you'll probably get more useful results from Yelp anyways…
Hope that helps!