[MOD-2346] Android: Ti.Map - Add support for dashed and dotted polylines
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-10T20:16:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0 |
Components | Map |
Labels | ios, map, overlay, polyline |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2017-07-04T17:45:14.000+0000 |
Updated | 2017-08-28T22:31:47.000+0000 |
Description
Feom the community: Add support for dashed and dotted polylines on Ti.Map for Android. There is also an API for iOS to do the same, so we should look after parity here as well. As soon as the PR (below) is approved, I will schedule the iOS work with the team.
*PR*: https://github.com/appcelerator-modules/ti.map/pull/201
*Test-Case*:
var Map = require('ti.map');
var win = Ti.UI.createWindow();
var mapView = Map.createView({
region: {
latitude: 37.338208,
longitude: -121.886329,
latitudeDelta: 0.1,
longitudeDelta: 0.1
}
});
mapView.addPolyline(Map.createPolyline({
strokeColor: 'red',
points: [{
latitude: 37.338208,
longitude: -121.886329
}, {
latitude: 37.138208,
longitude: -121.686329
}],
pattern: {
type: Map.POLYLINE_PATTERN_DOTTED, // Aso try POLYLINE_PATTERN_DASHED
gapLength: 20,
dashLength: 100
}
}));
win.add(mapView);
win.open();
FR Passed. PR merged.
Verified the fix with module: 3.2.0, 3.3.0 & SDK 6.2.0.v20170809112741. Closing. Studio Ver: 4.9.1.201707200100 SDK Ver: 6.2.0.v20170828140722 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.3 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.13 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1