Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2245] Android StreetViewPanorama: Expose radius property and add load+error events

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.2.0
Fix Version/sn/a
ComponentsMap
Labelsn/a
ReporterFokke Zandbergen
AssigneeUnknown
Created2016-04-18T07:39:27.000+0000
Updated2018-03-06T18:52:13.000+0000

Description

With TIMOB-19751 we've added StreetViewPanorama, however as various users found if you Google does not has a StreetViewPanorama near the given position the screen will be black. This is Android-native behaviour, but there are ways we can improve: * [setPosition](https://developers.google.com/android/reference/com/google/android/gms/maps/StreetViewPanorama#public-methods) can accept a second radius argument. We should expose this so that the user can determine in what radius Google should try to find a panorama. * There is a [workaround](http://stackoverflow.com/a/31695697/4626813) to determine if a panorama has been found. We could implement this and then fire either load or error so that the developer can handle this. Example with a position that doesn't get you a panorama:
var map = require('ti.map');

var win = Ti.UI.createWindow();

win.add(map.createStreetViewPanorama({
    position: { latitude: 52.9168666, longitude: -3.8009094 }
}));

win.open(); 

Comments

No comments

JSON Source