Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3273] Android: Map addRoute

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T03:41:03.000+0000
Affected Version/sn/a
Fix Version/sSprint-2011-09
ComponentsAndroid
Labelsandroid, feature, rplist
ReporterDawson Toth
AssigneeDon Thorp
Created2011-04-15T03:41:02.000+0000
Updated2017-03-24T18:33:22.000+0000

Description

Feature

Implement the "addRoute" function for Android.

Sample Code

The following code works on iOS and draws a fun route in Boston.

var win = Ti.UI.createWindow({ backgroundColor: '#00f' });
var map = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    region: {
        latitude: 42.3366, longitude: -71.1689,
        latitudeDelta: 0.001, longitudeDelta: 0.004
    }
});
map.addRoute({
    name: '1',
    points: [
        {latitude: 42.3353, longitude: -71.1705 },
        {latitude: 42.3383, longitude: -71.1690 },
        {latitude: 42.3358, longitude: -71.1670 },
        {latitude: 42.3353, longitude: -71.1705 }
    ],
    color: 'red',
    width: 4
});
map.addRoute({
    name: '2',
    points: [
        {latitude: 42.3363, longitude: -71.1682 },
        {latitude: 42.3370, longitude: -71.1686 },
        {latitude: 42.3369, longitude: -71.1692 },
        {latitude: 42.3366, longitude: -71.1695 },
        {latitude: 42.3361, longitude: -71.1690 },
        {latitude: 42.3368, longitude: -71.1685 }
    ],
    color: 'red',
    width: 4
});
win.add(map);
win.open();

Associated Helpdesk Ticket

http://developer.appcelerator.com/helpdesk/view/76235">http://developer.appcelerator.com/helpdesk/view/76235

Comments

  1. Dawson Toth 2011-04-15

    Accidentally duplicated https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/1343-android-add-route-support-to-mapview#ticket-1343-9"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...

  2. Don Thorp 2011-04-15

    Moving into a Sprint to get it out of TBS.

  3. Davide Bertola 2012-01-22

    Can you estimate when this will be available ?
  4. Arthur Evans 2012-02-02

  5. Lee Morris 2017-03-24

    Closing ticket as duplicate with reference to the linked issues.

JSON Source