User Tools

Site Tools


intents:google_maps

Differences

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

Link to this comparison view

intents:google_maps [2016/05/06 20:30]
stevegarman [Basic Map] check app is available
intents:google_maps [2018/12/30 13:30]
Line 1: Line 1:
-====== Google Maps ====== 
-This is the base information on using intents to call the Google Maps app. 
- 
-[[https://developers.google.com/maps/documentation/android-api/intents]] 
- 
-===== Basic Map ===== 
-This intent call the Google Maps app to draw a map with its centre at the location provided by latitude and longitude. 
- 
-<code JavaScript simpleMap.js> 
- 
-function OnStart() 
-{ 
-    var lat="51.5117"; 
-    var lng="-0.1275"; 
-    simpleMap(lat,lng); 
-} 
-function simpleMap(latitude,longitude) 
-{ 
-    var packageName = "com.google.android.apps.maps"; 
-    var className = null; 
-    var action = "android.intent.action.VIEW"; 
-    var uri =  "geo:"+latitude+","+longitude; 
-    if(app.IsAppInstalled( packageName )) 
-      app.SendIntent( packageName, className, action,null,uri ); 
-    else app.Alert("maps app not installed"); 
-} 
-</code> 
  
intents/google_maps.txt ยท Last modified: 2018/12/30 13:30 (external edit)