latitudeLongitudeBoundingBox

63 views
Skip to first unread message

Anna Hentzel

unread,
Apr 3, 2010, 3:11:11 PM4/3/10
to route-...@googlegroups.com
RMTileSource has a method latitudeLongitudeBoundingBox, which I guessed specified the bounds for the tile source, and the map wouldn't be allowed to move outside of those bounds. But that method isn't actually called anywhere. 

I'm guessing I'd just need to modify all the move functions in rmmapcontents to respect the bounds. Has anyone done any work on bounded tile sources?

Thanks,
Anna

--
Anna Hentzel
GaiaGPS.com
415-335-7447

Tracy Harton

unread,
Apr 3, 2010, 3:15:06 PM4/3/10
to route-...@googlegroups.com
I added that method, and set reasonable values for the different sources. I used it internally for a different purpose, but never got around to adding
scroll limits based off of it. That would be a nice addition.

/tracy

> --
> You received this message because you are subscribed to the Google Groups "route-me" group.
> To post to this group, send email to route-...@googlegroups.com.
> To unsubscribe from this group, send email to route-me-map...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/route-me-map?hl=en.

David

unread,
Apr 3, 2010, 5:31:56 PM4/3/10
to route-...@googlegroups.com
I will also be needing this method so will be adding this soon.

Anna Hentzel

unread,
Apr 3, 2010, 8:09:42 PM4/3/10
to route-...@googlegroups.com
I got this working, at least for a relatively small map area. {40,-119}, {39,-120}. I'll have to do some more testing to see if it breaks around the dateline and such.

The constraint requires that the center of the map be within the contained area, so you can zoom out farther, but to zoom back in your pivot has to be within the area. 

I couldn't get the projected bounds check to work with the default whole world bounds, so I hard coded a check for unbounded maps.  This could probably be cleaned up into a flag. I'd also like to add support for non rectangular bounds. 

I've attached my RMMapContents if anyone wants to check it out.

-Anna
Anna Hentzel
GaiaGPS.com
415-335-7447
RMMapContents.m
RMMapContents.h
Reply all
Reply to author
Forward
0 new messages