<< Click to Display Table of Contents >>

 

Adding OpenStreetMap Map to SuperGIS Server Map Website

 

 

1.Users need to build an Ultra web application before overlaying OpenStreetMap on SuperGIS Server. To know how to create Ultra web application, please refer to “Creating SuperGIS Server Ultra Website”. Click detail after finishing, and change the basemap as OpenstreetMap.

 

 

………

<script type="text/javascript" src="scripts/Overview.js"></script>

<script type="text/javascript" src="scripts/Bookmark.js"></script>

<script type="text/javascript" src="scripts/OpenStreetMap.js"></script>

<script>

………

 

 

2.In the code where to add layer in function InitWnd() insert the code of adding OpenStreetMap layer (the bold texts in blue). Please note that the code of adding OpenStreetMap layer must be inserted ahead of code of adding SuperGIS Server layer.

 

………

function InitWnd()

{

………

   var pTrans = new CachedLevelTransformation(pLyr);

   

   var pMapBase = new MapBase(pOMap, pTrans, 0, 0, "100%", "100%");  

   gMapBase = pMapBase;

 

   pMapBase.AddLayer(new OpenStreetMap("Standard", {
  url:["http://tile.opencyclemap.org/cycle/",
   "http://a.tile.opencyclemap.org/cycle/",
   "http://b.tile.opencyclemap.org/cycle/",
   "http://c.tile.opencyclemap.org/cycle/"]
 }));

   pMapBase.AddLayer(pLyr);

………

 

 

3.When the settings are finished, save SGSWebApp.htm. Open website browser, connect to SuperGIS Server website and you can find out OpenStreetMap map is successfully displayed and overlaid with SuperGIS Server map service layers in SuperGIS Server map website.  

 

 

 

 

 

 


©2017 Supergeo Technologies Inc.