[TIMOB-19751] Android: Add StreetView to map v2
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-02-21T18:14:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | Android |
Labels | module_androidmapv2, qe-manualtest, qe-testadded |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2015-10-20T18:49:15.000+0000 |
Updated | 2016-04-18T07:54:19.000+0000 |
Description
Implement street view panorama for map v2: https://developers.google.com/maps/documentation/android-api/streetview
Testing steps:
var win = Ti.UI.createWindow({
backgroundColor : "#fff"
});
var street = Ti.Map.createStreetViewPanorama({position: {latitude:-33.87365, longitude:151.20689}});
win.open();
win.add(street);
map PR: https://github.com/appcelerator-modules/ti.map/pull/131
Code tested with
PR Merged.
Verified the implementation. Works as expected. Closing. Environment: Appc Studio : 4.4.0.201511241829 Ti SDK : 5.2.0.v20160111111831 Ti CLI : 5.0.5 Alloy : 1.7.26 MAC Yosemite : 10.10.5 Appc NPM : 4.2.2 Appc CLI : 5.1.0 Node: v0.12.27 Nexus 6P - Android 6.0
I couldn't get this to work on an Nexus_5_API_23_x86 AVD using 5.2.0.RC, ti.map 2.3.6 and this in
tiapp.xml
:I get:
The error made me think it was the Android 6 runtime permission thing for external storage. But it ran fine on an Android 6 device. And after recreating exactly the same AVD it worked again as well. So let's hope this was a hiccup.
I don't think it is a question of permisions: 1. no errors on adb logcat 2. the storage permission is granted. I have tested 6.2.0.GA, 6.2.2.GA and 6.3.0 and a patched version of 6.2.2.GA with permissions. in all cases the screen keeps empty. ti.map2.3.6. T he version 2.3.8 is buggy (other story) Here my code: ~~~ var win = Ti.UI.createWindow({ theme : 'Theme.AMAKS', }); var position = { latitude : 56.1309561, longitude : 40.3559617 }; var pano = TiMap.createStreetViewPanorama({ position : position, panning : true, userNavigation : true, zoom : true, streetNames : true }); win.add(pano); win.open(); ~~~
Now I found: it works partly: I see in google maps blue colored streets (streetview exists) and if I use this position in native then partly the screen keeps empty. In HTML there are tow steps: 1. calculation of next pano iD depending of latlng (maybe error, because no pano near the point) 2. calling of panno by ID In native code we have only the latlng and not callback for ID or success. Anyway: maybe in both worlds are different panos. I think so because the latlng is direct on blue colored street and in app now streetview.
Solution: it depends on distance between latlng and next available streetview pano. There is no callback or result.
[~titanium@webmasterei-hamburg.de] I don't entirely follow your findings, but if you think there's a bug we must explore, could you create a new ticket?
Yes the problem is: there is no message, if google has no panoramo in the near. I will open a ticket. Second: the arrows on street partly doenst work.
[~titanium@webmasterei-hamburg.de] I've done some research and created MOD-2245 to address this.
Thank you -- it will improve the behaviour of the view.