Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixing zooming issue when the user try to zoom in a mapview with constraining coordinates. #162

Merged
merged 1 commit into from

2 participants

@alinux

Here I allow the zoom if the user wanted to zoom in, as always the user
can zoom in as long as the map is already displayed on the screen.

When the map is bounded to certain coordinates, some time the map
cannot be zoomed in if the zooming is taking place beside the boarders.

Note that when the zoom is at its max, the zoom will take place inside
the tile image itself.

@alinux alinux Fix zooming issue.
Here I allow the zoom if the user wanted to zoom in, as always the user
can zoom in as long as the map is already displayed on the screen.

When the map is bounded to certain coordinates, some time the map
cannot be zoomed in if the zooming is taking place beside the boarders.

Note that when the zoom is at its max, the zoom will take place inside
the tile image itself.
92bb41b
@michaeltyson michaeltyson merged commit 98ef489 into route-me:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 1, 2012
  1. @alinux

    Fix zooming issue.

    alinux authored
    Here I allow the zoom if the user wanted to zoom in, as always the user
    can zoom in as long as the map is already displayed on the screen.
    
    When the map is bounded to certain coordinates, some time the map
    cannot be zoomed in if the zooming is taking place beside the boarders.
    
    Note that when the zoom is at its max, the zoom will take place inside
    the tile image itself.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  MapView/Map/RMMapView.m
View
2  MapView/Map/RMMapView.m
@@ -349,7 +349,7 @@ - (void)zoomByFactor: (float) zoomFactor near:(CGPoint) center animated:(BOOL)an
zRect.size.height = screenBounds.size.height * metersPerPixel;
//can zoom only if within bounds
- canZoom= !(zRect.origin.northing < SWconstraint.northing || zRect.origin.northing+zRect.size.height> NEconstraint.northing ||
+ canZoom= zoomDelta > 0 || !(zRect.origin.northing < SWconstraint.northing || zRect.origin.northing+zRect.size.height> NEconstraint.northing ||
zRect.origin.easting < SWconstraint.easting || zRect.origin.easting+zRect.size.width > NEconstraint.easting);
}
Something went wrong with that request. Please try again.