[TIMOB-180] API - Maps
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:52:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.8.0 |
Components | iOS |
Labels | ios, iphone, maps |
Reporter | Nolan Wright |
Assignee | Blain Hamon |
Created | 2011-04-15T02:24:53.000+0000 |
Updated | 2011-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
});
this has been fully implemented for iphone with the exception of reverse and forward geo API.
(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...
this has been implemented.
the API is slightly different.