0
I’m not getting a DIV overlay on the location where the clic event is. I can map the coordinates of the mouse and store these values, but I need when you click on the page, to highlight this location with a circle or a note. I can do this highlighting by just entering the coordinates manually in the CSS and associating them to a button:
<style type="text/css">
.divOverlay {
top:586px;
left:647px;
position:absolute;
visibility:hidden;
z-index:500;
}
</style>
<!--Gera o DIV que exibira a marcação da local clicado -->
<script language="javascript" type="text/javascript">
function ShowOverlay(divID, xCoordinate, yCoordinate) {
var divObject = document.getElementById(divID);
divObject.style.visibility = "visible";
divObject.style.left = xCoordinate;
divObject.style.top = yCoordinate;
}
</script>
the DIV which is presented:(a red circle)
<div id="div1" class="divOverlay"> <img src="../img/local.png" class="img- rounded" alt="Local"> </div>
I need this highlight to occur at the mouse click on the clicked location.
Exactly.... this result is expected, but it remains visible instead of disappearing after a few seconds, but this is easy to correct,
– Felipe Oliveira
@Felipeoliveira decided to play a little with the example of Samir https://jsfiddle.net/f2d7ent3/ (I know you are not doing what you expect, but you may find it useful in the future).
– Tobias Mesquita
@Felipeoliveira, now no longer disappears :), was just that?
– Samir Braga
@Tobymosque, really, became very interesting. I liked it, leaving everything in 0.4s, mainly
– Samir Braga
I can retrieve the saved coordinates, but how do I load the page, mark these coordinates?
– Felipe Oliveira