Please help me how can I solve this problem Microsoft JScript runtime error: Number expected
google Map error in main.js
c.sort(function(z,x){return z.sqdist-x.sqdist})
I am writing code in asp.net with javascript
Iam send my script as below
<div id="map" style="width: 650px; height: 480px">
<asp:Image ID="imgMap" runat="server"
Height="480px" Width="650px" /></div>
<input id="txt" runat="server" style="visibility:
hidden" />
<script type="text/javascript">
function
renderGoogleMap(Hlat1,Hlon1,Hname1,addr)
{
var i;
var map =
new GMap(document.getElementById('map'));
var point =
new GLatLng(Hlat1,Hlon1);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(point,10);
var nearby =
new GIcon();
nearby.shadow = "http://labs.google.com/ridefinder/images/
mm_20_shadow.png";
nearby.iconSize = new GSize(20, 20);
nearby.shadowSize = new GSize(22, 20);
nearby.iconAnchor = new GPoint(6, 20);
nearby.infoWindowAnchor = new GPoint(5, 1);
var marker =
createMarker(point,Hname1,addr,'');
map.addOverlay(marker);
function
createMarker(point, name, addr, smallIcon)
{
var
Status = document.getElementById('txt').value;
var icon = new
GIcon(nearby);
var html;
if(Status=='K')
{
icon.image="../Images/blk.PNG";
}
else
if(Status=='KB')
{
icon.image="../Images/blu_blk.png";
}
else
if(Status=='B')
{
icon.image="../Images/blu.PNG";
}
else
if(Status=='KR')
{
icon.image="../Images/red_blk.PNG";
}
else
if(Status=='KY')
{
icon.image="../Images/yel_blk.PNG";
}
else
if(Status=='BR')
{
icon.image="../Images/red_blu.PNG";
}
else
if(Status=='BY')
{
icon.image="../Images/blu_yel.PNG";
}
else
if(Status=='KBR')
{
icon.image="../Images/blu_red_blk.PNG";
}
else
if(Status=='KBY')
{
icon.image="../Images/blu_yel_blk.PNG";
}
else
if(Status=='KG')
{
icon.image="../Images/grn_blk.PNG";
}
else
if(Status=='BG')
{
icon.image="../Images/grn_blu.PNG";
}
else
if(Status=='KBG')
{
icon.image="../Images/grn_blu_blk.PNG";
}
else
if(Status=='R')
{
icon.image="../Images/redd.PNG";
}
else
if(Status=='Y')
{
icon.image="../Images/yel.bmp";
}
else
if(Status=='G')
{
icon.image="../Images/grn.PNG";
}
html =
"<div class=bigfont>"+name+"<br><div
class=normaltext>"+addr+"</div></div>";
var marker
= new GMarker(point,icon);
GEvent.addListener(marker, "click", function()
{ marker.openInfoWindowHtml(html); });
return
marker;
}
}
renderGoogleMap();
</script>
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---
