Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-180] API - Maps

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:52:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 0.8.0
ComponentsiOS
Labelsios, iphone, maps
ReporterNolan Wright
AssigneeBlain Hamon
Created2011-04-15T02:24:53.000+0000
Updated2011-04-17T01:52:15.000+0000

Description

Description

The purpose of this API is to add support for in-app Map Views

TODO: NEED TO FIGURE OUT SPECS FOR THE FOLLOWING

  • Pin Annotations
  • Bubble Annoations
  • How to open a location detail window and customize contents

Examples


//
// create a map view (this is just another type of view for us)
//

var region = {coordinate:{longitude:long, latitude:lat}, span:{longitudeDelta:longDelta, latitudeDelta:latDelta}};

var view = Titanium.UI.createMapView({
    type: Titanium.UI.MAP_VIEW_STANDARD | Titanium.UI.MAP_VIEW_SATELLITE | Titanium.UI.MAP_VIEW_HYBRID,
    zoomEnabled: true | false, 
    scrollEnabled: true | false,
    region:region
    
});

view.setCenterCoordinate({longitude:long, latitude:lat});
view.setRegion(regionObject);

//
// this api allows you to translate a long/lat coordinate into a location
//
var coordinate = {longitude:long, latitude:lat};
Titanium.Geolocation.reverseGeocoder(coordinate, function(location)
{
     // location is a JSON object with reverse geo details (address, city, state, country, etc.)

     // a null value means it failed to do the reverse translation
});

Comments

  1. Jeff Haynie 2011-04-15

    this has been fully implemented for iphone with the exception of reverse and forward geo API.

  2. Jeff Haynie 2011-04-15

    (from [e87883b4632634a8595eb212364a7010a8076b42]) [#180 state:resolved] implemented forward and reverse geo coding in Geo module http://github.com/appcelerator/titanium_mobile/commit/e87883b4632634a8595eb212364a7010a8076b42"> http://github.com/appcelerator/titanium_mobile/commit/e87883b463263...

  3. Jeff Haynie 2011-04-15

    this has been implemented.

    the API is slightly different.

JSON Source