hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

ti.googlemaps on alloy #112

Closed lazzaratom closed 6 years ago

lazzaratom commented 6 years ago

Hi, does this module support titanium alloy development? I'm trying to do some test but without success. thank you.

yozef commented 6 years ago

Of course: .xml:

<Alloy>
  <Window id="win">
      <View id="mapview" module="ti.googlemaps"/>
....

.js:

var Map = require('ti.googlemaps'); // iOS Google Maps (native ti.googlemaps)
Map.setAPIKey("xxx"); // iOS Google API key from Console

// MapView Settings
$.mapview.myLocationButton = true;
$.mapview.addEventListener(...
hansemannn commented 6 years ago

Side-note: I think you can event do event-listeners via the Alloy-syntax.