Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-12755

Android: Support HYBRID_TYPE constant and regionchanged event on Maps v2 Module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      Mac OS X 10.7.5
      Titanium SDK version: 3.1.0 (02/11/13 17:10 68a0fef)
      ti.map 2.0 module
      Android 4.2
      Nexus 4

      Description

      1. Missing a constant to set the HYBRID_TYPE. As a workaround, I can set the mapType to 4 and it works. See code below.

      Constant is listed and used as an example in these links:
      https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/GoogleMap
      https://developers.google.com/maps/documentation/android/map?hl=en#change_the_map_type

      2. The regionchanged event does not fire when changing zoom level or moving the map around as with the previous Ti.Map module.

      var MapModule = require('ti.map');
       
      var win = Ti.UI.createWindow({backgroundColor: 'white'});
       
      var mapview = MapModule.createView({
          mapType: 4,
          region: {latitude: 37.389569, longitude: -122.050212, latitudeDelta: 0.1, longitudeDelta: 0.1}
      });
       
      function report (e) {
      	Ti.API.info('mapview:' + e.type);
      }
       
      mapview.addEventListener('regionchanged', report);
      mapview.addEventListener('postlayout', report);
      mapview.addEventListener('complete', report);
       
      win.add(mapview);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              bhatfield Benjamin Hatfield (Inactive)
              Reviewer:
              Ping Wang
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-15661
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration