googleway
googleway copied to clipboard
Clear Markers retains view
For me, the first marker (let's say a house in Massachusetts) I add, the map will zoom to it, then I clear markers, then I add a second marker (let's say a house in California), the map will not zoom to that house, but will be on a zoom and extent that shows the first marker and the second (even though the markers were cleared). The map seems to remember the markers even if they are cleared
Originally posted by @kaheil in https://github.com/SymbolixAU/googleway/issues/130#issuecomment-1135234056
The underlying issue is, the clear_()
methods should also remove / update the bounds to only the currently visible layers.
@kaheil the immediate solution I think is to set add_markers(, ... , focus_layer = TRUE)
. Using focus_layer
will re-center the map to only what's included in the data for this layer.
@kaheil the immediate solution I think is to set
add_markers(, ... , focus_layer = TRUE)
. Usingfocus_layer
will re-center the map to only what's included in the data for this layer.
this fixed the issue! thanks so much!