You are here:   GIS Web Map Tutorial > Dress up the map
  |  Login

Dress up the map


You may have noticed that the OSGeo map layer is kind of lacking in detail.  That being said it might be a good idea to change up the base layer we are using.  When it comes to free map base layers it can be difficult to find good ones to use and when we do we must make sure they are in the correct projection.  ArcGIS has published some pretty good web map services we can use.  We have to handle them a little different as they do not publish them as traditional wms services.  They have made them available through a REST service.  To handle REST services we can use  OpenLayers.Layer.ArcGIS93Rest object to create a layer to add to the map.

Let's first start by looking at the services that are offered in the ArcGIS Service Directory.  It is located  Feel free to click into these map layers as well as the folders at the top.  One thing that you might notice quickly is that they are in the wrong projection.  They all specify that they are in "Spatial Reference: 102100 (3857)" That could be problematic right?  Well luckly they have made the REST service available in epsg:4326.

I have decided to exchange the OSGeo layer for the ArcGIS layer World Street Map.  So to get the url we would click on the link on the web page which takes us to a full description of the map layer.  The url we will need for OpenLayers is that with /export added to the end.  So it would look like  .  Now that we have that we can build our layer.  I am simply going to replace the mapbase code that we had with the following.

 var mapbase = new OpenLayers.Layer.ArcGIS93Rest("ArcGIS Server Layer",
           { layers: "show:0", dpi: 96, FORMAT: "png24" });

 Now you can save that as webmap7.html and upload it to your web server.  It should look like mine.  This looks a lot more impressive than the OSGeo base map.  If you have any questions please feel free to stop in my new office #1057 on the first floor.