JSFiddle - React, Tailwind, and code Playground
by Barbos
HTML
<center><img id="im" width="256" height="256"/>
<div id="sp"></div>
<form>
map:<input name="map" value="here"/><br/>
x: <input name="x" value="19163"/><br/>
y: <input name="y" value="11048"/><br/>
z: <input name="z" value="16"/><br/>
<input type="button" value="test" onClick="
var url =computeUrl(form.map.value,form.x.value,form.y.value,form.z.value);
document.getElementById('im').src=url;
document.getElementById('sp').innerHTML=url;
return false;
"/>
</form>
JavaScript
function computeUrl(mapName,x,y,z) {
var version = '231e2c689a' // Обновлено 16.01.2018
var map = 'hybrid' // hybrid, satellite
var lang = 'rus' // eng, rus, ukr
var res = '256' // 256, 512
var url = 'http://'+Math.floor(Math.random()*3+1)+'.aerial.maps.api.here.com/'
+'maptile/2.1/maptile/'+version+'/'+map+'.day/'+(z-1)+'/'+x+'/'+y+'/'+res+'/png8?'
+'app_id=xWVIueSv6JL0aJ5xqTxb'
+'&app_code=djPZyynKsbTjIUDOBcHZ2g'
+'&lg='+lang;
return url;
};