[ALOY-694] Add support for Google Maps v2 add-on module
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-10-02T17:43:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 20 |
Components | n/a |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Tony Lukasavage |
Created | 2013-06-07T21:12:29.000+0000 |
Updated | 2014-06-22T13:21:31.000+0000 |
Description
As a developer, I would like to be able to use Alloy views and styles when adding maps to my Android app that implement the Google Maps v2 add-on module. I understand that I would still need to manually perform the other required steps for using this module (obtaining the API key and updating my tiapp.xml). But I'd like to use the
$.__views.map = Ti.Map.createView({
could be replaced with something like:
$.__mapmodule = require('ti.map');
$.__views.map = $.__mapmodule.createView({
There are platform-specific attributes, which can be handled with the existing platform-handling features in styles.
Enabling the Google Maps API v2 module
Full explanation is at http://goo.gl/EBozL (Maps v2 guide) In a nutshell, you must:Obtain an API key from Google
1. Get the SHA-1 fingerprint from your keystore 2. Visit https://code.google.com/apis/console/ 3. Click Create Project or select project name, click Create 4. In list of services, turn on Google Maps Android API v2 5. Accept the terms of service 6. Click API Access, then click Create New Android Key 7. Paste in your SHA-1 fingerprint followed by a semicolon followed by your app's App ID 8. Note the resulting "Key for Android Apps (with certificates)" -- that's your API keyUpdate tiapp.xml with your Key
1. Visit http://goo.gl/EBozL (Maps v2 guide) 2. Scroll to find "Obtain and Add a Google API Key" 3. Copy the manifest XML code sample and paste into your tiapp.xml 4. Paste your API key where indicated in that sample code 5. Replace the twoComments
- Tony Lukasavage 2013-09-30 Android v2 maps can be used in markup as detailed in ALOY-817