User Tools

Site Tools


intents:google_maps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
intents:google_maps [2016/05/07 09:48]
49.225.61.108 [Basic Map]
intents:google_maps [2018/12/30 13:30] (current)
Line 23: Line 23:
     if(app.IsAppInstalled( packageName ))     if(app.IsAppInstalled( packageName ))
       app.SendIntent( packageName, className, action,null,uri );       app.SendIntent( packageName, className, action,null,uri );
-    else {+    else 
 +    {
     app.Alert("maps app not installed");     app.Alert("maps app not installed");
     app.OpenUrl("market://details?id="+packageName);     app.OpenUrl("market://details?id="+packageName);
-       }+    } 
 +
 +</code> 
 +===== Turn by Turn Navigation ===== 
 +This function could be used instead of simpleMap above to start navigating towards the destination. 
 +<code JavaScript navigate.js> 
 +function navigateTo(latitude,longitude) 
 +
 +    var packageName = "com.google.android.apps.maps"; 
 +    var className = null; 
 +    var action = "android.intent.action.VIEW"; 
 +    var uri =  "google.navigation:q="+latitude+","+longitude; 
 +    if(app.IsAppInstalled( packageName )) 
 +      app.SendIntent( packageName, className, action,null,uri ); 
 +    else 
 +      app.Alert("maps app not installed");
 } }
 </code> </code>
intents/google_maps.1462614539.txt.gz · Last modified: 2016/05/07 17:49 (external edit)