Thank you very much for your kind reply. ok. I'll re-size Image on server side. Yesterday you sent css code for changing the color of infobubble. It is working fine, but how to change the arrow color?.
I have one more issue. Please show me solution.
I have multiple latitudes and longitudes generated dynamically. Now, I need multiple markers for various latitude and longitudes. Also I required click event which is showing infobubble with the related message. I written the code in php and using for loop. Please go through the below code and give me solution.
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=UTF-8" />
<title>Ovi Maps API Example</title>
<script src="http://api.maps.nokia.com/2.1.1/jsl.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="map" style="z-index: -1; left:0px; top:0px; width: 50%; height: 50%; position: absolute;"></div>
<style type="text/css">
.nm_bubble_content{
color:black;
background:white;
border: 1px solid black;
padding:0px;
}
</style>
<?
$alat = Array('38.385668','39.908105','41.03816','36.788164','39.916388','37.002343','39.86799','37.081958','37.004293');
$along = Array('27.05791','32.860727','28.98478','34.6057','32.862725','35.331382','32.82192','27.456939','35.311241');
?>
<script src="http://api.maps.nokia.com/2.1.1/jsl.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
//var alat = 52.530390;
//var along= 13.385190;
var bubbleContainer = new nokia.maps.map.component.InfoBubbles();
//bubbleContainer.options.defaultWidth = 50;
<?
for ($i=0;$i<=8;$i++)
{
?>
var coords_array_lat = new Array();
coords_array_lat[<?=$i?>] = "<?=$alat[$i]?>";
alert(coords_array_lat[<?=$i?>]);
var coords_array_lon = new Array();
coords_array_lon[<?=$i?>] = "<?=$along[$i]?>";
alert(coords_array_lon[<?=$i?>]);
// var coords = new Array();
// coords[<?=$i?>] = nokia.maps.geo.Coordinate(coords_array_lat[<?=$i?>], coords_array_lon[<?=$i?>]);
// alert(coords[<?=$i?>]);
<? } ?>
var marker = new nokia.maps.map.StandardMarker(coords);
var infoBubble;
var restore_bubble = false;
var bubbleText = "Test message here"
map = new nokia.maps.map.Display(
document.getElementById("map"),
{
'zoomLevel': 12,
'center': [alat, along],
components: [
new nokia.maps.map.component.Behavior(),
new nokia.maps.map.component.ZoomBar(),
new nokia.maps.map.component.TypeSelector(),
bubbleContainer
]
});
var markersIconsUrl = "http://www.mobilesroom.com/wp-content/uploads/2012/01/Yahoo-Logo-Images.jpg";
startIcon = new nokia.maps.gfx.BitmapImage(markersIconsUrl, null, 32, 32, 10, 10);
startMarker = new nokia.maps.map.Marker(new nokia.maps.geo.Coordinate(alat, along), {
icon: startIcon,
anchor: new nokia.maps.util.Point(12, 12)
});
startMarker.addListener("click", function() {
infoBubble = bubbleContainer.addBubble(bubbleText, coords);
restore_bubble = true;
});
map.objects.add(startMarker);
</script>
</body>
</html>