Παρασκευή 26 Φεβρουαρίου 2016

Embed a WMS map in your page

What to do if you want the visitors of your page or blog to have quick access in a web map of your choice. What if you want them to view a particular area of the web map and its legend in a frame on your page?
Or what to do if you simply own a WMS service and you want to promote it by presenting a showcase of it.
In both cases an easy solution is to create links that open your web map in WMS viewer on line and embed it on your site or post the link. The visitors of your site will view your map on an iframe or will only have to click on a link and your map will open in their browsers.
There are two easy ways to do this.
First way is to create links through the application itself. Open your map in WMS Viewer on line then click the save button on the top of the page or choose the option from the tools menu. Then click on the create link button on the side bar. Copy the link and use it in your site or share it.
Alternatively, use this form to input the connection parameters to your web map and click the button to create the link.
It is then easy to embed the link in any site, blog, social media page etc.
See the following html code as an example on how to create an iframe.

<div>
<iframe src="http://wmsviewer-rodis.rhcloud.com/custom.html?&wmsurl=http://geo.weather.gc.ca/geomet/?&wmslayer=GDPS.ETA_TT&wmsborder=coast&wmsside=Legend&wmscenterx=-17.667607421876&wmscentery=52.781647367079&wmszoom=4&wmsprj=EPSG:4326" frameBorder="0" style="margin: 0; padding: 0"></iframe>
</div>

Next see an example on how to create a link like this

<a href=" http://wmsviewer-rodis.rhcloud.com/custom.html?&wmsurl=http://geo.weather.gc.ca/geomet/?&wmslayer=GDPS.ETA_TT&wmsborder=coast&wmsside=Legend&wmscenterx=-17.667607421876&wmscentery=52.781647367079&wmszoom=4&wmsprj=EPSG:4326" target="_blank">My web map</a>





Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου