[TIMOB-15613] iOS7: Ti.Map.View always asks for permission to use current location
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-03-03T20:52:10.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | n/a |
Components | iOS |
Labels | SupportTeam |
Reporter | Fokke Zandbergen |
Assignee | Ingo Muschenetz |
Created | 2013-10-24T10:24:33.000+0000 |
Updated | 2017-03-20T22:14:49.000+0000 |
Description
The following code will show a alert asking the user for permission to use his current location, regardless if
userLocation
is set to false
or unset:
var win = Titanium.UI.createWindow({
backgroundColor: '#fff'
});
win.add(Ti.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {
latitude: 37.390749,
longitude: -122.081651,
latitudeDelta: 0.01,
longitudeDelta: 0.01
},
userLocation: false
}));
win.open();
Cause
When the map is initialized in [TiMapView.m](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiMapView.m#L63),showsUsersLocation
is always set to YES
. Instead, this should depend on whether userLocation
was set.
The PR: https://github.com/appcelerator/titanium_mobile/pull/4843
+1 on this :)
tested
Mac osx 10.9.2 Mavericks Appcelerator Studio, build: 3.2.3.201403271839 Titanium SDK, build:3.2.3.v20140327115429 Node.JS Version: v0.10.13 NPM Version: 1.3.2 /usr/local/lib ├── acs@1.0.14 ├── alloy@1.3.1 ├── node-appc@0.2.0 ├── npm@1.3.2 ├── titanium@3.2.3-alpha2 └── titanium-code-processor@1.1.1-alpha Devices: iPad air iOS 7.1 iPhone 5S iOS 7.1
Closing ticket as duplicate.