Demo link or sample code:
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%
Dim aiLat, aiLong
aiLat = "+40.728941+40.727909+40.7381935"
aiLong = "+-74.008147+-74.008648+-74.0091527"
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MarkerWithLabel Example</title>
<style type="text/css">
.labels
{
color: red;
font-family: "Lucida Grande" , "Arial" , sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
width: 40px;
height: 30px;
white-space: nowrap;
}
.selectoption
{
width: 117px;
height: 23px;
}
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.3&sensor=true"></script>
<script type="text/javascript" src="markerwithlabel_v2.js"></script>
<script type="text/javascript">
var lati = '<%=aiLat%>';
var longi = '<%=aiLong%>';
var map;
function initMap() {
laticenter = "40.725542";
longicenter = "-73.996168";
var latLng;
latLng = new google.maps.LatLng(laticenter, longicenter);
map = new google.maps.Map(document.getElementById('map_canvas'), {
zoom: 12,
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
for (var i = 0; i < 20; i++) {
var arrlat = new Array();
var arrlong = new Array();
arrlat = lati.split("+");
arrlong = longi.split("+");
setupmap(arrlat[i], arrlong[i]);
}
}
function setupmap(lats, long) {
if ((lats != undefined) && (long != undefined)) {
var marker = new MarkerWithLabel({
position: new google.maps.LatLng(lats, long),
map: map,
draggable: false,
title: 'fmhsbfjh',
icon: 'images/icon_rate.png',
labelText: 'manali',
labelClass: "labels", // the CSS class for the label
labelStyle: { opacity: 1 },
animation: google.maps.Animation.DROP
});
}
}
</script>
</head>
<body onload="initMap()">
<div id="map_canvas" style="height: 60%; width: 100%">
</div>
</body>
</html>
I am having a problem with google maps.The above code is working fine in
mozilla but it is not working in IE and also i am having a problem in zoom
in.When the map is zoomed i cannot drag the map further.Is it the apis have
been changed.Please help me out with this.Awaiting for reply.
Original issue reported on code.google.com by shetty.m...@gmail.com on 4 Nov 2011 at 10:50
Original issue reported on code.google.com by
shetty.m...@gmail.com
on 4 Nov 2011 at 10:50