New wiki-page
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:
$(document).ready(function () {
$(document).ready(function () {
     $("#map-catcher").mousedown(function (e) {
     $("#map-catcher").mousedown(function (e) {
         $("#coord").text("x:"+e.offsetX+", y:"+e.offsetY);
         $("#marker").cx(offsetX);
     });
     });
});
});

Revision as of 18:08, 9 August 2017

<style>

  1. map-container{
   position:relative;
   width:300px;
   height:300px;

}

  1. map-svg{
   position:absolute;
   left:0px;
   top:0px;

}

  1. map-catcher{
   position:absolute;
   left:0px;
   top:0px;
   height:100%;
   width:100%;

} </style>


<script>

$(document).ready(function () {

   $("#map-catcher").mousedown(function (e) {
       $("#marker").cx(offsetX);
   });

});

}

</script>