I've had an issue with the Android version of our app (iOS works great) for some time now, and need to find a resolution for an upcoming release.
Essentially, my app has a searchable map view which behaves as follows:
- Create initial search bar and map view with no annotations.
- Load map points from a Web service and store in the database.
- User searches, which searches the database and returns an array. The array is iterated through and annotations are created/added to the map one at a time.
The annotation pins show on the map fine. The problem is, after the map is loaded, the user can't click any of the annotations on the map to see the title UNTIL they drag the map a little bit, which causes the map to abruptly move significantly more than the user actually dragged it. Once a user has done this, the map works as expected for any additional searches.
Has anyone seen similar behavior, and how did you solve it?
Code example of how annotations are plotted after search:
points = searchResultArray; for (var i=0, iLength = points.length; i<iLength; i++) { var _annotationParams = {}, _annotation; _annotationParams.title = points[i].title; _annotationParams.latitude = points[i].latitude; _annotationParams.longitude = points[i].longitude; _annotationParams.myid = 'annotation' + i; _annotationParams.subtitle = ''; _annotation = Titanium.Map.createAnnotation(_annotationParams); mapView.addAnnotation(_annotation); }Android SDK 2.3.3 APIS and 2.2 APIS, Titanium SDK 1.6.2, 1.6.1.
Your Answer
Think you can help? Login to answer this question!