Anna,
I'm really sorry but I'm just not getting it. Think half the problem
is my poor understanding of map projections.
So to confirm once again, I have a map that has a limit to its bounds
(imagine a map of a city).
What I need to do is to stop dragging beyond the bounds in all
directions.
You mentioned:
> tileSourceBoundsContainProjectedPoint: function in RMMapContents, and
> instead of calling it for the center of the source, compute the
> corners of the map and call it for two of the opposite corners.
In RMContents.m I find 5 references. One is the method and the other
call the method. The only one I see that is being called is :
- (void)moveBy: (CGSize) delta
In this method you do the following (I assume to get the centre):
RMProjectedPoint projCenter = [mercatorToScreenProjection
projectedCenter];
RMProjectedSize XYDelta = [mercatorToScreenProjection
projectScreenSizeToXY:delta];
projCenter.easting = projCenter.easting - XYDelta.width;
projCenter.northing = projCenter.northing - XYDelta.height;
So what Projected point do I need to define and pass to
tileSourceBoundsContainProjectedPoint? If I just pass in NE then how
do I determine I am dragging the opposite way? And what about up and
down?
Sorry if I sound like I have no idea what I'm doing, but I'm beginning
to think I don't!
> > For more options, visit this group athttp://
groups.google.com/group/route-me-map?hl=en.