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
I'm plotting trips on Google Maps as base map. Trips' bboxes are sometimes 'squares' and sometimes 'rectangles'. When they are 'squares' most of the time, zoomlon = zoomlat and the whole trip is plotted.
But when they are 'rectangles', sometimes zoomlon != zoomlat. For the trip to be fully plotted, and not cropped, the min zoom needs to be taken, not the max zoom.
I took that part of code that computes the zoom, changed the line to min(zoomlon, zoomlat) and fed the computed zoom to get_map() and that solved my issue.
The text was updated successfully, but these errors were encountered:
Long story short
Briefly, this line https://github.com/dkahle/ggmap/blob/master/R/get_map.R#L178, should read
zoom <- min(zoomlon, zoomlat)
instead of
zoom <- max(zoomlon, zoomlat)
Problem
I'm plotting trips on Google Maps as base map. Trips' bboxes are sometimes 'squares' and sometimes 'rectangles'. When they are 'squares' most of the time, zoomlon = zoomlat and the whole trip is plotted.
But when they are 'rectangles', sometimes zoomlon != zoomlat. For the trip to be fully plotted, and not cropped, the min zoom needs to be taken, not the max zoom.
I took that part of code that computes the zoom, changed the line to
min(zoomlon, zoomlat)
and fed the computed zoom toget_map()
and that solved my issue.The text was updated successfully, but these errors were encountered: