Show points and routes with Google Maps in iOS
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Show points and routes with Google Maps in iOS
Hi,
Any experiences about how in iOS show routes and points into a Google Map?
Attach some images to show what I trying.
Also I guess that using the GPS location, center a map and show points of interest or marks. Using the GoogleMap kit I be able of center a map into a stack but with iOS I can't.
Thanks in advance.
Salut,
JosepM
Any experiences about how in iOS show routes and points into a Google Map?
Attach some images to show what I trying.
Also I guess that using the GPS location, center a map and show points of interest or marks. Using the GoogleMap kit I be able of center a map into a stack but with iOS I can't.
Thanks in advance.
Salut,
JosepM
- Attachments
-
- Zoom out with the route in green
- Imagen 942.png (122.53 KiB) Viewed 5379 times
-
- Zoom in
- Imagen 943.png (51.79 KiB) Viewed 5379 times
Re: Show points and routes with Google Maps in iOS
I found that with the Google Maps API V3 I can show that I need.
iphoneControlDo id, "load", baseUrl, htmlText
Loads as page consisting of the given htmlText with the given baseUrl (wraps the loadHtmlString method of UIWebView).
Locally I can read from my database the stored marks and prepare the HTML, then load into the Browser.
In htmlText I put my HTML code, and the URL in baseURL.
But now how can I handle the click over a mark into the map to go to one card of the stack? Any idea if is posible?
Salut,
Josep
iphoneControlDo id, "load", baseUrl, htmlText
Loads as page consisting of the given htmlText with the given baseUrl (wraps the loadHtmlString method of UIWebView).
Locally I can read from my database the stored marks and prepare the HTML, then load into the Browser.
In htmlText I put my HTML code, and the URL in baseURL.
But now how can I handle the click over a mark into the map to go to one card of the stack? Any idea if is posible?
Salut,
Josep
Re: Show points and routes with Google Maps in iOS
it's probably something with "iphoneControlGet". I'm not doing iOS dev, so can't say what parameter it'd be, sorry.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Show points and routes with Google Maps in iOS
The way I've done work with a web view in iOS before and interacting back with the code is by catching the "browserLoadRequest".
(You also need to make sure to set: iphoneControlSet sBrowserId, "delayRequests", "true")
This way you can, say, create a fake URL that you access that has some unique identifying feature about it which you can then parse and intercept. For example, in the code, create a link associated with the pin that goes to http : / / example . com/?myUniqueCode=43.28271,-71.72532
Then, in LiveCode card script:
(You also need to make sure to set: iphoneControlSet sBrowserId, "delayRequests", "true")
This way you can, say, create a fake URL that you access that has some unique identifying feature about it which you can then parse and intercept. For example, in the code, create a link associated with the pin that goes to http : / / example . com/?myUniqueCode=43.28271,-71.72532
Then, in LiveCode card script:
Code: Select all
on browserLoadRequest pUrl, pReason
if pUrl contains "?myUniqueCode=" then
put char offset("?myUniqueCode=",14) to -1 of pUrl into pCode
-- Do something with pCode
else
pass browserLoadRequest
end if
end browserLoadRequest
Re: Show points and routes with Google Maps in iOS
Hi,
Many thanks, is just that I need. So in this way you can trap each load request before this will be completed, from the marks or whatever, isn't?
Salut,
Josep
Many thanks, is just that I need. So in this way you can trap each load request before this will be completed, from the marks or whatever, isn't?
Salut,
Josep
Re: Show points and routes with Google Maps in iOS
Great post thanks!