Code (This is how the code looks like based on the configuration above. It can be copied and pasted directly into your project):
<html>
<head>
<title>SiteWatch API Example Viewer</title>
<script src='http://kort.samsyn.is/api/SiteWatch.aspx?v=2&key=your_keycode' type='text/javascript'></script>
<script type='text/javascript'>
//A map object variable.
var map;
//Create a map object.
function InitMap() {
var zoomLevel = 7;
var centerX = 359583;
var centerY = 406481;
map = SWMap.create('map',
{ panButton: true, zoomButton: true,
defaultZoom: zoomLevel, defaultCenterPoint: { x: centerX, y: centerY }
});
//Create point object.
var point1 = SWPoint.create(359583, 406481);
//Create vectorcircle object.
var circle2 = map.addVectorCircle('circle',
point1, 100,
{ lineColor: 'red', fillColor: 'rgba(249, 95, 94, 0.5)', lineWidth: 10, minSize: 5 }, false);
};
</script>
</head>
<body onload='InitMap()'>
<div id='map' style='height:300px; width:600px;'></div>
</body>
</html>
|