HTML
<div style="position: absolute; z-index: 5000; left: 65px;"> <input type="text" id="Long" placeholder="Longitude" value="2.328450697115128"> <input type="text" id="Lat" placeholder="Latitude" value="48.80814035316188"> <button type="button" onclick="GCUI.examples.moveTo()">Move To</button> </div> <div id="map" style="height: 300px;"></div>
JavaScript
var options = { server : 'https://api.geoconcept.com/EU/GCW/geoconcept-web/wmts', layer : 'STANDARD' }; var map = new GCUI.Map('map', options); GCUI.examples = { moveTo : function() { var map = GCUI.getMap('map'); var coords = [parseFloat(document.getElementById("Long").value),parseFloat(document.getElementById("Lat").value)]; var xy = ol.proj.transform(coords, 'EPSG:4326','EPSG:3857'); map.moveTo(xy, 11); } }