This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
intents:google_maps [2016/05/06 17:36] administrator created |
intents:google_maps [2018/12/30 13:30] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Google Maps ====== | ====== Google Maps ====== | ||
- | This is the base information on calling Google maps intents. | + | This is the base information on using intents |
[[https:// | [[https:// | ||
===== Basic Map ===== | ===== Basic Map ===== | ||
- | This is intent | + | This intent |
<code JavaScript simpleMap.js> | <code JavaScript simpleMap.js> | ||
+ | function OnStart() | ||
+ | { | ||
+ | var lat=" | ||
+ | var lng=" | ||
+ | simpleMap(lat, | ||
+ | } | ||
+ | function simpleMap(latitude, | ||
+ | { | ||
+ | var packageName = " | ||
+ | var className = null; | ||
+ | var action = " | ||
+ | var uri = " | ||
+ | if(app.IsAppInstalled( packageName )) | ||
+ | app.SendIntent( packageName, | ||
+ | else | ||
+ | { | ||
+ | app.Alert(" | ||
+ | app.OpenUrl(" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | ===== 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, | ||
+ | { | ||
+ | var packageName = " | ||
+ | var className = null; | ||
+ | var action = " | ||
+ | var uri = " | ||
+ | if(app.IsAppInstalled( packageName )) | ||
+ | app.SendIntent( packageName, | ||
+ | else | ||
+ | app.Alert(" | ||
+ | } | ||
</ | </ | ||
- |