OS OpenSpace [logo]

OS OpenSpace Forum » OS OpenSpace » OpenSpace Forum

Thread: Map zoom and pan extremities

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Pages: 1 - Last Post: 11-Jan-2012 14:19 by: ianholt
intechnia

Posts: 4
Registered: 02/12/11
Map zoom and pan extremities
Posted: 02-Dec-2011 14:55
  Click to reply to this thread Reply

Hi

When the map is zoomed out or panned to extreme left, right etc. it shows the container div background colour.

Is it possible to restrict the panning of the map to within the limits of the tiles available?

Thanks
Terry

chadwickBill

Posts: 390
Registered: 07/02/08
Re: Map zoom and pan extremities
Posted: 02-Dec-2011 18:01   in response to: intechnia
  Click to reply to this thread Reply

You could always set the container background colour to be the same as the sea colour at each zoom level (using zoomend event)

bigmentor

Posts: 176
Registered: 13/06/09
Re: Map zoom and pan extremities
Posted: 04-Dec-2011 07:50   in response to: intechnia
  Click to reply to this thread Reply

Look at:
http://www.sst-maps.co.uk/testapost.htm

Never mind the content - look at line 457

It was created in October as a diagnostic page for some other problem that I was suffering !!

It works in IE - not tested in other browsers

Try resizing the window - it works wit that as well

Pete (Northolt UK)

bigmentor

Posts: 176
Registered: 13/06/09
Re: Map zoom and pan extremities
Posted: 04-Dec-2011 07:51   in response to: bigmentor
  Click to reply to this thread Reply

Whoops - sorry, Wrong thread

intechnia

Posts: 4
Registered: 02/12/11
Re: Map zoom and pan extremities
Posted: 04-Jan-2012 10:17   in response to: chadwickBill
  Click to reply to this thread Reply

Thanks for the suggestion.

I have set the div container background to the same as the sea colour which works at all zoom levels, but there still exists a big white border to the left and top of the map. Any ideas how to get rid of this?

Thanks
Terry

ianholt

Posts: 10
Registered: 01/05/09
Re: Map zoom and pan extremities
Posted: 11-Jan-2012 14:19   in response to: intechnia
  Click to reply to this thread Reply

Hi Terry,
Have you got a public working example or can send us the code for a working example. It'll just be easier to visualise that way.
Thanks,
Ian
OS OpenSpace Team

Legend
Expert: 51 - 1000 pts
Advanced: 31 - 50 pts
Intermediate: 16 - 30 pts
Novice: 5 - 15 pts
Newbie: 0 - 4 pts
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums