You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=================description========================
I'm using OL 2.13.1 on IE8 or filefox on WINXP
I made the base layer as tiled and the overlay layer as singleTiled.
In my application, the size of map div changes to the size of browser window.
sometimes when the user resizes the browser window, it comes an javascript error: this.layer is null
everytime when the browser enters fullscreen mode, the same error happens
help me please
=================code=======================
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'});
map.addLayer(wms);
var dm_wms = new OpenLayers.Layer.WMS(
"Canadian Data",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{
layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true",
format: "image/png"
},
{
isBaseLayer: false,
singleTile: true
}
);
map.addLayer(dm_wms);
map.zoomToMaxExtent();
$(window).resize(function(){
var w = $(window).width();
var h = $(window).height();
$("#map").width(w/2);
$("#map").height(h/2);
map.updateSize();
});
});
</script>
The text was updated successfully, but these errors were encountered:
=================description========================
<script src="http://openlayers.org/api/OpenLayers.js"></script> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'}); map.addLayer(wms);I'm using OL 2.13.1 on IE8 or filefox on WINXP
I made the base layer as tiled and the overlay layer as singleTiled.
In my application, the size of map div changes to the size of browser window.
sometimes when the user resizes the browser window, it comes an javascript error: this.layer is null
everytime when the browser enters fullscreen mode, the same error happens
help me please
=================code=======================
});
</script>
The text was updated successfully, but these errors were encountered: