Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19751] Android: Add StreetView to map v2

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-02-21T18:14:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.2.0
ComponentsAndroid
Labelsmodule_androidmapv2, qe-manualtest, qe-testadded
ReporterHieu Pham
AssigneeHieu Pham
Created2015-10-20T18:49:15.000+0000
Updated2016-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);

Comments

  1. Hieu Pham 2015-10-28

    map PR: https://github.com/appcelerator-modules/ti.map/pull/131
  2. Ashraf Abu 2015-10-30

    Code tested with
       // Add in the module
       var MapModule = require('ti.map');
       var win = Ti.UI.createWindow({backgroundColor: 'white'});
       
       var street = MapModule.createStreetViewPanorama({
       	position: {latitude:1.281581286057009, longitude:103.8641372560966}
       });
       
       win.add(street);
       win.open();
       
    PR Merged.
  3. Lokesh Choudhary 2016-01-14

    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
  4. Fokke Zandbergen 2016-02-20

    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:
       	<android xmlns:android="http://schemas.android.com/apk/res/android">
           <manifest>
             <application>
               <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyB1ATGRrby9stkKxvdl3SBYxSVB5Kkm7yM"/>
             </application>
           </manifest>
         </android>
       	<modules>
       		<module platform="android">ti.map</module>
       	</modules>
       
    I get:
       [WARN]  System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/chimera-module-root/module-a3e4fba11e705727c59ff3116ef21fa4834b9f56/native-libs/x86
       [INFO]  I/Google Maps Android API: Google Play services client version: 7571000
       [INFO]  I/Google Maps Android API: Google Play services package version: 8489470
       [WARN]  ContextImpl: Failed to ensure /sdcard/Android/data/test.street/cache: java.lang.SecurityException: Invalid mkdirs path: /storage/self/primary/Android/data/test.street/cache
       [DEBUG] AndroidRuntime: Shutting down VM
       
    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.
  5. Rainer Schleevoigt 2016-04-08

    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(); ~~~
  6. Rainer Schleevoigt 2016-04-08

    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.
  7. Rainer Schleevoigt 2016-04-08

    Solution: it depends on distance between latlng and next available streetview pano. There is no callback or result.
  8. Fokke Zandbergen 2016-04-11

    [~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?
  9. Rainer Schleevoigt 2016-04-11

    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.
  10. Fokke Zandbergen 2016-04-18

    [~titanium@webmasterei-hamburg.de] I've done some research and created MOD-2245 to address this.
  11. Rainer Schleevoigt 2016-04-18

    Thank you -- it will improve the behaviour of the view.

JSON Source