Results 1 to 9 of 9

Thread: SKCalloutView positioning not synchronised with map

  1. #1
    Neuer skobbler
    Join Date
    02.09.2015
    Posts
    5

    SKCalloutView positioning not synchronised with map

    I use SKCalloutView on Skobbler Map (v2.5) for Android. Problem is that Popup is not always centered on annotation. If annotation is not at center, then popup displayed with big offset, so it become difficult to understand to which annotation is popup belongs.

    Another problem that if I move map with popup view, popup movement on map not synchronised. It moves with notable delay.

    Is it possible to solve this issues?

  2. #2
    Dev platform evangelist dandronic's Avatar
    Join Date
    31.03.2014
    Posts
    177
    Please add a code snippet with the code you are using to define your annotation & its callout (popup)

  3. #3
    Neuer skobbler
    Join Date
    02.09.2015
    Posts
    5
    // Create annotation
    mapView.deleteAllAnnotationsAndCustomPOIs();
    mapView.clearAllOverlays();

    SKCoordinate coordinate = new SKCoordinate(latLng.longitude, latLng.latitude);
    SKAnnotation annotation = new SKAnnotation(id++);

    SKAnnotationView skView = new SKAnnotationView();

    LayoutInflater inflater = (LayoutInflater) App.getApp().getSystemService(Service.LAYOUT_INFLA TER_SERVICE);
    View view = inflater.inflate(R.layout.layout_purchased_marker, null);
    TextView textView = (TextView) view.findViewById(R.id.text);
    textView.setText(String.valueOf(tourLocation.getOr der()));
    skView.setView(view);

    annotation.setAnnotationView(skView);
    annotation.setLocation(coordinate);

    mapView.addAnnotation(annotation, SKAnimationSettings.ANIMATION_NONE);

    // Create popup
    mapPopup = mapViewGroup.getCalloutView();
    LayoutInflater inflater = (LayoutInflater) App.getApp().getSystemService(Service.LAYOUT_INFLA TER_SERVICE);
    View view = inflater.inflate(R.layout.layout_preview_info_wind ow, null);
    popupView = view;
    mapPopup.setCustomView(view);

    // Show
    int annotationHeight = 0;
    float annotationOffset = annotation.getOffset().getY();
    mapPopup.setVerticalOffset(-annotationOffset + annotationHeight);
    mapPopup.showAtLocation(annotation.getLocation(), true);
    Last edited by space0; 02.09.2015 at 08:45.

  4. #4
    Dev platform evangelist dandronic's Avatar
    Join Date
    31.03.2014
    Posts
    177
    Please also add the layouts for layout_purchased_marker and layout_preview_info_window (if there are any custom icons there, please also add them)

  5. #5
    Neuer skobbler
    Join Date
    02.09.2015
    Posts
    5
    Sorry, forum not allow me to post

    The following errors occurred with your submission
    You have included a total of 16 images and/or videos in your message. The maximum number that you may include is 10. Please correct the problem and then continue again.

    Images include use of smilies, the BB code [img] tag, and HTML tags. Videos are included with the BB code [video] tag. The use of these is all subject to them being enabled by the administrator.
    So I've pasted code here - http://pastebin.com/8KhV3eus

    It reproduced as well on AndroidOpenSourceDemo, but effect is not such notable.
    Last edited by space0; 02.09.2015 at 09:23.

  6. #6
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Thank you.
    We've reported this ticket to our development team. We'll get back to you as soon as we have an update.

  7. #7
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Hi @space0,

    You'll find here the updated code:https://www.dropbox.com/s/tk0rfawn3r...dated.txt?dl=0

    Our developers made a few changes for fixing the wrong popup movement on map, removing the android: orientation="vertical" and android:gravity="center_horizontal" from layout_preview_info_window
    Please test and let us know if everything works as expected now

  8. #8
    Neuer skobbler
    Join Date
    27.07.2016
    Posts
    9
    Even after Latest update as of AUG/25/2016, this problem still persists

  9. #9
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    We haven’t included our developers suggestion in the demo app. The suggestion shared was for that app specific issue.

Tags for this Thread

Posting Permissions

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