View Full Version : SKCalloutView positioning not synchronised with map

02.09.2015, 07:45
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?

02.09.2015, 08:32
Please add a code snippet with the code you are using to define your annotation & its callout (popup)

02.09.2015, 08:42
// Create annotation

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()));


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;

// Show
int annotationHeight = 0;
float annotationOffset = annotation.getOffset().getY();
mapPopup.setVerticalOffset(-annotationOffset + annotationHeight);
mapPopup.showAtLocation(annotation.getLocation(), true);

02.09.2015, 08:46
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)

02.09.2015, 09:02
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 <img> 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.

03.09.2015, 08:59
Thank you.
We've reported this ticket to our development team. We'll get back to you as soon as we have an update.

20.10.2015, 14:52
Hi @space0,

You'll find here the updated code:https://www.dropbox.com/s/tk0rfawn3rw1h7e/code%204%20SKCalloutView%20positioning%20issue%20u pdated.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

26.08.2016, 07:32
Even after Latest update as of AUG/25/2016, this problem still persists

31.08.2016, 10:21
We havenít included our developers suggestion in the demo app. The suggestion shared was for that app specific issue.