[OpenLayers-Users] Map Wont Show

Arnd Wippermann arnd.wippermann at web.de
Sun Jul 8 10:02:57 PDT 2012


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/e
xport?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/20120708/5022783e/attachment.html>


More information about the Users mailing list