I have an image (which is actually a webservice map), where, upon a change of user chosen parameters, the bounding box must be changed and the image updated.
It's working if I replace the whole image tag:
document.getElementById("dropzone1").innerHTML = "<img style='margin-top: 0'
src='http://neowms.sci.gsfc.nasa.gov/wms/wms?
SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&
LAYERS=MOD13A2_E_NDVI&SRS=EPSG:4326&STYLES=&WIDTH=500&HEIGHT=400&
BBOX=10.163726806640625,49.10217838413516,10.240631103515625,49.14172346635712'>";
But I'd like to only replace the rear part, the BBOX data with a variable "extent":
str.replace("10.163726806640625,49.10217838413516,10.240631103515625,49.14172346635712", extent")
Is there a simple way of doing this? The number of decimals vary.
Thanks for any hints!