Revision d74aa4df
Added by Andreas Kohlbecker over 13 years ago
modules/cdm_dataportal/js/openlayers_map.js | ||
---|---|---|
99 | 99 |
"Google Satellite", |
100 | 100 |
{type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22} |
101 | 101 |
); |
102 |
|
|
102 | 103 |
var ghyb = new OpenLayers.Layer.Google( |
103 | 104 |
"Google Hybrid", |
104 | 105 |
{type: G_HYBRID_MAP, 'sphericalMercator': true} |
... | ... | |
236 | 237 |
var boundsStr = (typeof options.boundingBox == 'string' && options.boundingBox.length > 6 ? options.boundingBox : '-180, -90, 180, 90'); |
237 | 238 |
var zoomToBounds = OpenLayers.Bounds.fromString( boundsStr ); |
238 | 239 |
map.zoomToExtent(zoomToBounds.transform(dataProj, map.getProjectionObject()), false); |
240 |
if(map.getZoom() > options.maxZoom){ |
|
241 |
map.zoomTo(options.maxZoom); |
|
242 |
} else if(map.getZoom() < options.minZoom){ |
|
243 |
map.zoomTo(options.minZoom); |
|
244 |
} |
|
239 | 245 |
|
240 | 246 |
// adjust height of openlayers container div |
241 | 247 |
$('#openlayers').css('height', $('#openlayers #openlayers_map').height()); |
Also available in: Unified diff
fixes and modifications for TDWG 2010