Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    1

    ItemizedOverlay problem with Here Maps

    I'm porting my android app that uses Google Maps API V1 (MapActivity) and have changed to use Here Maps API as per instructions. Maps display OK.
    I have subclassed ItemizedOverlay in order to provide some custom map marker functionality (see simplified code snippet below).
    The markers appear on the map as they should (correct position).
    However, when I tap on a marker, the OnTap handler is invoked with a wrong index.
    This same code works on Android.
    Is there some kind of different caching policy here?

    Code:
    public class SpotOverlay extends ItemizedOverlay<OverlayItem> {
    	private ArrayList<OverlayItem> mItems = new ArrayList<OverlayItem>();
    
    	@Override
    	protected boolean onTap(int index) {
    		OverlayItem item = mItems.get(index);
    		// PROBLEM: index does not correspond to the marker that was added previously
    	}
    
    	@Override
    	protected OverlayItem createItem(int i) {
    		return mItems.get(i);
    	}
    
    	@Override
    	public int size() {
    		return mItems.size();
    	}
    
    	public void addNewMarker(GeoPoint point, String title, String description, int id, boolean populate) {
    		mItems.add(new OverlayItem(point,title,description));
    
    		if(populate) populate();
    	}
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,184

    Re: ItemizedOverlay problem with Here Maps

    I sent email to the team creating the wrapper, and lets wait what they can find out.

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,184

    Re: ItemizedOverlay problem with Here Maps

    Thank you for the information, it was determined to be a bug in the implementation and we have fix being implemented, thus should be fixed in next update.

Similar Threads

  1. Porting Google Maps v2 to HERE Maps -> Error initializing map: problem with disk cach
    By soucecastle in forum Nokia X Announcements and Feedback
    Replies: 6
    Last Post: 2014-02-28, 14:58
  2. Is there a way to convert Maps Data from Nokia Maps 3 to be compatible with N Maps 2
    By dimchopicha in forum General Development Questions
    Replies: 6
    Last Post: 2011-01-09, 18:50
  3. Navigation route coordinates from Nokia Maps or Ovi Maps
    By selimsolmaz in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2010-03-04, 11:02
  4. Replies: 3
    Last Post: 2010-03-03, 11:25
  5. Replies: 2
    Last Post: 2010-03-02, 19:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×