[OpenLayers-Users] Map Wont Show
David TRACY
kurttracy at utah.gov
Tue Jul 17 17:58:42 PDT 2012
I updated my code with the new suggestions. This time i get a white layer over the background. Before all I could see was background.
I noticed an error in IE i might not of noticed previously.
Message: Object doesn't support this property or method
Line: 30
Char: 5
Code: 0
URI: http://fiddle.jshell.net/pBnB8/1/show/
Message: 'this.baseLayer.wrapDateLine' is null or not an object
Line: 238
Char: 276
Code: 0
URI: http://openlayers.org/dev/OpenLayers.js
Suggestions would be appreciated. Thanks for the help this far.
David "Kurt" Tracy
Emergency Management Planner II
1-801-828-8158 Cell
1-801-538-3767 Office
>>> "Arnd Wippermann" <arnd.wippermann at web.de> 07/08/2012 11:02 AM >>>
you have to add "export?f=image" to your url and the layers parameter is
somethink like "show:0,1,2".
function init(){
var mapOptions = {
maxExtent: new OpenLayers.Bounds(-174,18.4,-63.5,71),
maxResolution: 0.25,
projection: "EPSG:4326"};
map = new OpenLayers.Map( 'map', mapOptions );
layer = new OpenLayers.Layer.ArcGIS93Rest( "ArcGIS Server Layer",
"http://mapserv.utah.gov/ArcGIS/rest/services/UtahBaseMap-Hybrid/MapServer/export?f=image",
{ layers: "show:0,1,2" });
map.addLayer(layer);
map.addControl( new OpenLayers.Control.MousePosition() );
map.setCenter(new OpenLayers.LonLat(-111.6, 39.3), 9);
}
window.onload = init();
Arnd
Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von David TRACY
Gesendet: Samstag, 7. Juli 2012 04:10
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] Map Wont Show
I am new to open layers. Will you please verify my code is correct. Can you give me any pointers on how to troubleshoot if the service is bad.
Here is a fiddle of the map.
http://jsfiddle.net/pBnB8/
The controls show up but nothing else.
David "Kurt" Tracy
Emergency Management Planner II
1-801-828-8158 Cell
1-801-538-3767 Office
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120717/aa91bf49/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TRACY, David.vcf
Type: application/octet-stream
Size: 384 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120717/aa91bf49/attachment.obj>
More information about the Users
mailing list