[ALOY-848] Titanium Alloy Map not showing in production release
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2013-10-29T22:25:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 22 |
Components | Titanium SDK |
Labels | android |
Reporter | Mauro Parra-Miranda |
Assignee | Tony Lukasavage |
Created | 2013-10-09T22:35:22.000+0000 |
Updated | 2013-10-29T22:25:05.000+0000 |
Description
Started via developer question:
http://developer.appcelerator.com/question/156954/bug-in-titanium-alloy-map
I have started by using the following sample:
https://github.com/appcelerator/alloy/tree/master/test/apps/ui/map
Running on a Production build with proper Google API Key I get the following when opening the map:
10-08 19:47:30.878: W/System.err(2337): IOException processing: 26
10-08 19:47:30.878: W/System.err(2337): java.io.IOException: Server returned: 3
10-08 19:47:30.878: W/System.err(2337): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
10-08 19:47:30.878: W/System.err(2337): at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
10-08 19:47:30.878: W/System.err(2337): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
10-08 19:47:30.878: W/System.err(2337): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
10-08 19:47:30.878: W/System.err(2337): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
10-08 19:47:30.878: W/System.err(2337): at java.lang.Thread.run(Thread.java:864)
To ensure it wasn't a key problem, I modified the project above and changed index.xml to:
<Alloy></Alloy>
And index.js to:
var MapModule = require('ti.map');
var win = Ti.UI.createWindow({
backgroundColor: "white",
navBarHidden: false,
title: "BETA Pub Crawl"
});
var mapview = MapModule.createView({
mapType: MapModule.NORMAL_TYPE,
region: {latitude:37.390749, longitude:-122.081651,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
enableZoomControls:true,
touchEnabled:true,
userLocation:true,
zIndex:10
});
var ann = MapModule.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:MapModule.ANNOTATION_RED,
animate:true,
annid:1,
venueid:1
});
mapview.addAnnotation(ann);
win.add(mapview);
win.open();
And the map opens as expected.
[~kolchy] it would help if you could show the actual alloy app you are using that's failing.
This because by default Alloy does not use the Android v2 map module. So the traditional code you used and got to work does not actually match the generated Alloy code. In order to use the Android v2 map module with Alloy, follow this guide: * http://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android and use this Alloy app as an example: * https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-817 In the future, I will update the ui/map example so that it uses the Android v2 maps by default.