diff options
| author | Teddy Wing | 2017-04-19 16:10:40 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-04-19 16:10:40 +0200 | 
| commit | 4b24aa49fe5222803e03d31d71f0362f47da457c (patch) | |
| tree | e85e5510ff764275dbb1ae418717daa04dd54c76 /index.html | |
| parent | f484cf3c23155ab0b31ab686f7f7ceb4e7186856 (diff) | |
| download | geo-feature-examiner-4b24aa49fe5222803e03d31d71f0362f47da457c.tar.bz2 | |
index.html: When a feature is clicked, display its WKT on the page
Allow us to see the coordinates of the selected feature.
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 5 | 
1 files changed, 5 insertions, 0 deletions
| @@ -7,10 +7,14 @@  	<link rel="stylesheet" href="https://openlayers.org/en/v4.1.0/css/ol.css" type="text/css">  </head>  <body> +	<textarea class="js-selected-feature"></textarea> +  	<div id="map"></div>  	<script src="https://openlayers.org/en/v4.1.0/build/ol.js"></script>  	<script> +		var output_el = document.getElementsByClassName('js-selected-feature')[0]; +  		var raster = new ol.layer.Tile({  			source: new ol.source.OSM()  		}); @@ -47,6 +51,7 @@  		select_click.on('select', function(e) {  			if (e.selected.length) {  				var feature = e.selected[0]; +				output_el.textContent = format.writeFeature(feature);  			}  		}); | 
