facebook

Show maps route

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #331989 Reply

    Hi 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?

    #332040 Reply

    Hi dokmadeinitaly,

    Please see next doc of Google Map API (V3): https://developers.google.com/maps/documentation/javascript/directions

    #332973 Reply

    walt
    Member

    I 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.
    #332979 Reply

    walt
    Member

    Here 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.
    #332987 Reply

    walt
    Member

    attached is a working example of getting directions between your location and some other location that (I think) is set up as mobione intends, using the map widget.

    Hopefully somebody finds this helpful…

    Attachments:
    You must be logged in to view attached files.
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Show maps route

You must be logged in to post in the forum log in