<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAQZQ79vYAa-1wzJxkPKCEChQEhmDGzsGb-4cWCjyiuAFBxkv8lBT-UZm6C7rwMRlDky9_abkrICnhgw" language="javascript"></script>
<script language="xml">
<style type ="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
</script>
<script type="text/javascript">
//<![CDATA[
var map;
function load()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById('map'));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(34.09660000,-118.41200000), 13);
var geocoder = new GClientGeocoder();
function createMarker(point, address)
{
var marker = new GMarker(point);
GEvent.addListener(marker, 'click', function(){marker.openInfoWindowHtml(address.split('^')[0]+ "<br><br>" + "<a class='mapclass' href='http://maps.google.com/maps?f=d&saddr= ,CA,90210&daddr="+address.split('^')[1]+"' target='_blank'>View Directions</a>" );});
return marker;
}
var baseIcon = new GIcon();
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); baseIcon.infoShadowAnchor = new GPoint(18, 25); function createHomeMarker(point, address)
{
var icon = new GIcon(baseIcon);
icon.image = "http://www.google.com/mapfiles/markerH.png";
var homeMarker = new GMarker(point,icon);
GEvent.addListener(homeMarker , 'click', function(){homeMarker.openInfoWindowHtml(address);});
return homeMarker;
}
var count = 0;
function showAddress(address,disp,ico)
{ geocoder.getLatLng
(address,
function(point)
{
if (!point)
{
if (count == 0)
{
alert(address + ' not found');
}
count++;
}
else
{
map.setCenter(point,13);
var marker = new GMarker(point);
map.addOverlay(marker);
map.addOverlay(createMarker(point,'<strong>Sadath store(Distance : 0 Miles)<br>3124 south<br>Beverly Hills, CA 90210</strong>^3124 south ,Beverly Hills,CA,90210'));
marker.openInfoWindowHtml(disp + "<br><br>" + "<a class='mapclass' href='http://maps.google.com/maps?f=d&saddr= ,CA,90210&daddr= 3124 south ,Beverly Hills,CA,90210' target='_blank'>View Directions</a>");
}
}
);
}
showAddress('3124 south ,Beverly Hills,CA,90210','<strong>Sadath store(Distance : 0 Miles)<br>3124 south<br>Beverly Hills, CA 90210</strong>',null);
var point = new GLatLng(34.09660000,-118.41200000);
map.addOverlay(createMarker(point,'<strong>Test(Distance : 0 Miles)<br>3124 south<br>Beverly Hills, CA 90210</strong>^3124 south ,Beverly Hills,CA,90210'));
var point = new GLatLng(34.09660000,-118.41200000);
map.addOverlay(createMarker(point,'<strong>Test2(Distance : 0 Miles)<br>3124 south<br>Beverly Hills, CA 90210</strong>^3124 south ,Beverly Hills,CA,90210'));
var point = new GLatLng(34.09150000,-118.38200000);
map.addOverlay(createMarker(point,'<strong>Threedots(Distance : 1.75 Miles)<br>8465 1/2 MELROSE ALLEY<br>West Hollywood, CA 90069</strong>^8465 1/2 MELROSE ALLEY ,West Hollywood,CA,90069'));
}
}
//]]>
</script>
=====================
lbl.Text = script
=========================
<asp:Content ID="Content2" ContentPlaceHolderID="HCP" runat="Server">
<asp:Localize ID="lbl" runat="server"></asp:Localize>
</asp:Content>
======================
No comments:
Post a Comment