Add HTML Marker
Instructions
Use the "Add" button to add marker with info. Embed any HTML code in your marker.
See the JavaScript API for more information.
Source Code
The Javascript code for the above map is:
<script language="Javascript"
src="http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=API
&Typ=JS"></script>
<script language="JavaScript">
var mapper = new IMapper();
function startup() {
mapper.initMap(41.1, 29.1, 6);
mapper.addNavigationPanel();
return;
}
function add() {
var html = "<div style='height:20;width:60;background-color:yellow'>Iframe</div>
<div style='width:300px;height:150px;background-color:#ffffff'>
<iframe src='http://www.locationbox.com.tr'></div>";
mapper.addHtmlMarker('id_1', 41.1, 29.1, html);
return;
}
function remove() {
mapper.removeFeature('id_1');
return;
}
</script>
Buttons:
<a href="javascript:add()"
><img src="images/add.gif" border=0></a>
<a href="javascript:remove()"
><img src="images/remove.gif" border=0></a>
Download working pageRemember that you need to use your key code as Key attribute.