Uploaded image for project: 'Appcelerator Modules'
  1. Appcelerator Modules
  2. MOD-2450

Ti.Map: Allow annotation to be animated to new location

    Details

    • Type: New Feature
    • Status: Open
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Map

      Description

      Ti.Map annotations should be allowed to animate. This brings better UX to the map.

      Implementation, based on Stackoverflow, seems simple enough: https://stackoverflow.com/questions/26015904/how-to-animate-mapview-annotations-from-one-location-to-another

      on ios:

      -(void) animateAnnotation:(MyAnnotation*)annotation{
         [UIView animateWithDuration:2.0f
                          animations:^{
                               annotation.coordinate = newCordinates;
                          }
                          completion:nil];
      }
      

      https://stackoverflow.com/a/42057162/249710
      on Android:

      LatLng fromLocation = new LatLng(38.5, -100.4); // Whatever origin coordinates
      LatLng toLocation = new LatLng(37.7, -107.7); // Whatever destination coordinates
      Marker marker = mMap.addMarker(new MarkerOptions().position(firstLocation));
      MarkerAnimation.animateMarkerToICS(marker, toLocation, new LatLngInterpolator.Spherical());
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              topener Rene Pot
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Source Code