
Originally Posted by
karthik7452
Hi,
I changed the code as you said, but it is not displaying. I am using Windows 7 Safari 5.0.5 browser. Please check once again.
The following code works with my version of Safari (obviously you'll need your own appId and token)
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9" />
<title>Nokia Maps API Example</title>
<script src="http://api.maps.nokia.com/2.2.0/jsl.js" type="text/javascript" charset="utf-8">
</script>
<style type="text/css">
/*<![CDATA[*/
/* common settings checkbox and radiobutton */
input[type="checkbox"]
{
-khtml-appearance: visual;
width: 20px;
height: 20px;
vertical-align: middle;
}
/*]]>*/
</style>
</head>
<body>
<span id="nm_tooltip" style="float:left"><input type="checkbox" name="chk" id=
"chk" /></span> Check box display here
<div id="map" style=
"z-index: -1; left:0px; top:50px; width: 50%; height: 50%; position: absolute;">
</div><script type="text/javascript">
//<![CDATA[
/////////////////////////////////////////////////////////////////////////////////////
// Don't forget to set your API credentials
//
// Replace with your appId and token which you can obtain when you
// register on http://api.developer.nokia.com/
//
nokia.Settings.set( "appId", "YOUR APP ID GOES HERE");
nokia.Settings.set( "authenticationToken", "YOUR AUTHENTICATION TOKEN GOES HERE");
//
/////////////////////////////////////////////////////////////////////////////////////
var node = document.createElement("span");
node.id = 'nm_tooltip';
node.style.top = 0;
node.style.left = 0;
node.style.position="absolute";
node.style.color = "blue";
var checkBox = document.createElement("input");
checkBox.style.zorder = -1;
checkBox.type="checkbox";
node.appendChild(checkBox);
node.appendChild(document.createTextNode('Check box 2 display here'));
/// Initialise the map.
var map = new nokia.maps.map.Display(
document.getElementById("map"),
{
'zoomLevel': 4,
'center': [52.5152, 13.380001],
components: [
new nokia.maps.map.component.Behavior(),
new nokia.maps.map.component.ZoomBar(),
new nokia.maps.map.component.TypeSelector()
]
});
// add the node.
document.getElementById("map").appendChild(node);
//]]>
</script>
</body>
</html>
see the attachment for the result.