user721588
user721588

Reputation:

openlayers do not show blank areas around map

I have a simple map. When I zoom out to the map min zoom level (whole map overview) then I see a lot blank area around the map? Is it possible not to show it? Do I need to somehow apply pan locker or set bounds or what I need to do?

Upvotes: 0

Views: 134

Answers (1)

Martin
Martin

Reputation: 896

You can use the restrictedExtent attribute to restrict panning after a certain extent. Here is an example: Openlyers restricedExtent Example

You can also restrict zoom levels with these attributes:

minZoomLevel
maxZoomLevel
numZoomLevels

Upvotes: 1

Related Questions