You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
In here, getMarkerViewsInRect returns an incorrect list of marker views. I verified this by attaching a OnGlobalLayoutListener to the view and noticing that some times when I run:
Unfortunately, even if I then override the view's visibility according to screenVisible (which seems to be more accurate) the marker still flickers out.
@yperess do you have some code to reproduce this with? Tried reproducing this with the test app MarkerView setup without any luck. Are you using anchoring/offset? Large icons?
@tobrun I'll try to get you a sample. Unfortunately our code is in a private repo right now and I can't just share it. I'll try to extract a sample tonight and post a link to it here. For now here's a very rough sample of what we're doing. The images coming in from the network are capped at around 100x100 px (depending on screen density)
final MarkerView marker = mMap.addMarker(new MarkerViewOptions()
.flat(false)
.position(new LatLng(pin.latitude, pin.longitude));
Picasso.with(getContext())
.load(url)
.into(new Target() {
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
// Here I add some code that manipulates the bitmap by using a canvas and
// adding multiple extra bits to it (such as a base that lays flat on the
// map).
marker.setIcon(IconFactory.getInstance(getContext()).fromBitmap(bitmap));
marker.setAnchor(0.5f, baseOffsetRatio);
}
@Override
public void onBitmapFailed(Drawable errorDrawable) {
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable) {
}
});
@tobrun, where is this add markers in bulk sample? How are you able to add multiple marker views (1000) on the map? I have markerviews a custom one and I just have 180+ markers and it was very slow.
@neonwarge04 the system will keep inflating views if it needs to display a MarkerView. The key is to not show them all at once ( this will make the system recycle the views instead of inflating new ones).
Related to the issue, haven't seen any reports and underlying logic has changed.
Feel free to reach out if this is still an issue. Closing for now.
It's a blocking issue which has left us with migrating off your product and over to Google Maps until this can be resolved. Did you have no luck with the sample app I provided?
Thank you for the additional ping, been looking a bit more in this issue and believe the source will be related to #8799. Thank again for reaching out and reporting your issue.
Activity
tobrun commentedon Mar 13, 2017
@yperess do you have some code to reproduce this with? Tried reproducing this with the test app MarkerView setup without any luck. Are you using anchoring/offset? Large icons?
yperess commentedon Mar 13, 2017
@tobrun I'll try to get you a sample. Unfortunately our code is in a private repo right now and I can't just share it. I'll try to extract a sample tonight and post a link to it here. For now here's a very rough sample of what we're doing. The images coming in from the network are capped at around 100x100 px (depending on screen density)
tobrun commentedon Mar 14, 2017
Haven't been able to reproduce the issue, would you be able to retest with the latest SNAPSHOT?
Since beta.2 the underlying code has changed a bit.
yperess commentedon Mar 14, 2017
yperess commentedon Mar 15, 2017
https://github.com/yperess/MapboxClippingDemo
Notice that it takes me about 60+ seconds to find the right combination of zoom/orientation where the views get clipped
Video
galacticappster04 commentedon Mar 16, 2017
@tobrun, where is this add markers in bulk sample? How are you able to add multiple marker views (1000) on the map? I have markerviews a custom one and I just have 180+ markers and it was very slow.
tobrun commentedon Apr 19, 2017
@neonwarge04 the system will keep inflating views if it needs to display a MarkerView. The key is to not show them all at once ( this will make the system recycle the views instead of inflating new ones).
Related to the issue, haven't seen any reports and underlying logic has changed.
Feel free to reach out if this is still an issue. Closing for now.
yperess commentedon Apr 19, 2017
It's a blocking issue which has left us with migrating off your product and over to Google Maps until this can be resolved. Did you have no luck with the sample app I provided?
tobrun commentedon Apr 24, 2017
Thank you for the additional ping, been looking a bit more in this issue and believe the source will be related to #8799. Thank again for reaching out and reporting your issue.