-
Notifications
You must be signed in to change notification settings - Fork 2
Using the CSN data in your own website
All of the maps that are shown in the Critical Site Network tool are available to embed within your own website in accordance with the terms and conditions set out below. The technology that is used to publish the maps is ESRI's ArcGIS Server technology and the maps are published as ESRI Map Services. These map services can be incorporated into websites using a number of free API's that are produced by ESRI. These ArcGIS Server Web APIS are fully documented here: http://resources.arcgis.com/content/arcgisserver/web-apis. You have a choice of the technology that you use (Javascript, Flex or Silverlight) and a choice of the background maps data (Google Maps API, ESRI ArcGIS Online Content or Microsofts Bing Maps).
The main method for including maps into you own websites is to use one of the ESRI ArcGIS Server Web API's and to reference it in your own website. You can then add any of the services that are available from the REST Services Directory published at the following address: http://dev.unep-wcmc.org/arcgis/rest/services. These REST map services are fully documented here REST Services Description.
Below is an example of a simple page that includes a map of the distribution of Bar-tailed Godwit written using the ArcGIS Server Javascript Web API:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo page showing a species map from the CSN mapping services</title>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1" type="text/javascript"></script>
<link href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet" type="text/css" >
<script type="text/javascript">
dojo.require("esri.map");
var map;
function init()
{
var startExtent=new esri.geometry.Extent(-14000000,-10000000,14000000,14000000,new esri.SpatialReference({wkid:102100}));
map = new esri.Map("mapDiv",{extent:startExtent});
var basemapURL= "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL);
map.addLayer(basemap);
var speciesURL= "http://dev.unep-wcmc.org/ArcGIS/rest/services/CSN/Species/MapServer";
var speciesLayer = new esri.layers.ArcGISDynamicMapServiceLayer(speciesURL);
var layerDefinitions = [];
layerDefinitions[0] = "SpcRecID=3005";
speciesLayer.setLayerDefinitions(layerDefinitions);
speciesLayer.setVisibleLayers([0]);
speciesLayer.setOpacity(0.7);
map.addLayer(speciesLayer);
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<h1>Showing data for the Bar-tailed Godwit <i>Limosa lapponica</i></h1>
<div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
</body>
</html>
This simple example shows you how you can use one of the services that are available for a species, but you can also use any of the site based mapping services as well if you want.
There are also a number of simple table REST services that return information about species, critical sites or IWC sites. These are shown in the REST Services Directory as Tables. These data services can be consumed either through native JSON calls or through the appropriate classes in the ArcGIS Server Web APIs.
For example, the following REST call will return all of the information for Bar-tailed Godwit from the species table: http://dev.unep-wcmc.org/ArcGIS/rest/services/CSN/Species/MapServer/5/query?text=&geometry=&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=SpcRecID%3D3005&time=&returnIdsOnly=false&returnGeometry=false&maxAllowableOffset=&outSR=&outFields=*&f=html
This can be used with a QueryTask class to retrieve the data in a web page. See ArcGIS Server Javascript Web API - QueryTask Class.
The use of the mapping and data services is on acceptance of the following use conditions:
-
The user accepts the general Data License Terms and Conditions available in the CSN User Manual (downloadable from here: http://dev.unep-wcmc.org/csn/usermanual.doc
-
The following text must appear on any page that is using maps or data from the CSN Web Services:
The maps/data used in this page have been provided from the Wings Over Wetlands project through the Critical Sites Network Tool Web Services. For more information contact Szabolcs Nagy at Wetlands International ([email protected])
- All uses of the maps/data must be communicated to Szabolcs Nagy at Wetlands International ([email protected]).