- This topic has 4 replies, 3 voices, and was last updated 12 years, 5 months ago by
walt.
-
AuthorPosts
-
dokmadeinitalyMemberHi everyone,
I saw this document http://www.genuitec.com/mobile/docs/usingMaps/usingMaps.html but I cant understand how to draw a route between the user current position to an other defalut position (something like a real time navigation map)Please, can you post the function code here?
support-octavioMemberHi dokmadeinitaly,
Please see next doc of Google Map API (V3): https://developers.google.com/maps/documentation/javascript/directions
waltMemberI have tried a couple ways to make the gdirections work in MobiOne without much success.
Attached is a project that drops one of the super simple examples from google into mobione. It does not recognize google.maps.DirectionsService().
Has anyone been able to get google.maps.DirectionsService() to work in mobione?
Attachments:
You must be logged in to view attached files.
waltMemberHere is a way to get directions to work in an app…(definitely not the right way though)
I dropped the map and all the javascript into an html widget. Then I tried appending api reference to the head with this:
$("head").append($('<script src="http://maps.google.com/maps?file=api&v=2&sensor=false" type="text/javascript"></script>'));
…but that did not work for some reason (always worked in the past). So instead I just added it to the html file manually, copying this into the head:
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false" type="text/javascript"></script>
There has to be a better way. I can’t figure out why the javascript runs when I drop it in the html widget, but not when it is in the *_custom.js file…
Attachments:
You must be logged in to view attached files. -
AuthorPosts