Jump to content

Overlaying marker images ontop of an image at coordinates


Hypnos

Recommended Posts

I have a map image that I want to place "pushpins" on. I have some concept code that mostly works (although IE is a little off), although I have to wonder if there is a better way of doing it.

 

http://www.kodb.info/map.php

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div align="center">
<input type="button" onclick="document.getElementById('button').style.display = ''" value="Doda"><br>
<img src="elmorad.jpg" id="image">
</div>
<img src="http://www.kodb.info/greenbullet.gif" style="position: absolute; display: none;" id="button">
<script type="text/javascript">
document.getElementById("button").style.top = document.getElementById("image").offsetTop +370 + "px";
document.getElementById("button").style.left = document.getElementById("image").offsetLeft +470 + "px";
</script>
</body>
</html>

 

I'd rather not use a API or framework if I don't have to.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.