<% @ Page Language = "C #" autoeventwireup = "true" codefile = "map. aspx. cs" inherits = "map" %>
<! 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 id = "head1" runat = "server">
<Title> No title page </title>
<Style type = "text/CSS">
HTML {Height: 100%}
Body {Height: 100%; margin: 0px; padding: 0px}
# Map_canvas {Height: 100%}
</Style>
<SCRIPT type = "text/JavaScript" src = "http://maps.google.com/maps/api/js? Sensor = false "> </SCRIPT> <% -- sensor parameter to indicate whether the application uses sensors to determine the user's location -- %>
<SCRIPT src = "scripts/jquery-1.4.2.min.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
VaR map;
$ (Function (){
VaR mylatlng = new Google. Maps. latlng (24.47056849943595, 118.11364889144897 );
VaR myoptions = {
Zoom: 21,
Center: mylatlng,
Maptypeid: Google. Maps. maptypeid. Roadmap
}
Map = new Google. Maps. Map (document. getelementbyid ("map_canvas"), myoptions );
Bf_restaurant_service.selectby_latlngzoomws _ bf_restaurant _ (24, 25,117,119, 1, onget1_antsucceed_dhx, onget1_anterror_dhx );
});
Function ongetrestaurantsucceed_dhx (reslist_dhx ){
Alert (reslist_dhx );
If (reslist_dhx = NULL) return;
For (I = 0; I <reslist_dhx.length; I ++ ){
Alert (reslist_dhx [I]. LAT latitude + "," + reslist_dhx [I]. lng longitude );
VaR mylatlng = new Google. Maps. latlng (reslist_dhx [I]. LAT latitude, reslist_dhx [I]. lng longitude );
VaR marker = new Google. Maps. Marker ({
Position: mylatlng,
Map: map,
Title: reslist_dhx [I]. Name
});
}
}
Function ongetrestauranterror_dhx (err_dhx ){
Alert (err_dhx.get_message ());
}
</SCRIPT>
</Head>
<Body>
<Table>
<Tr>
<TD> </TD>
<TD> <Div id = "map_canvas"> </div> </TD>
</Tr>
</Table>
<Form ID = "form1" runat = "server">
<Asp: scriptmanager id = "scriptmanager1" runat = "server">
<Services>
<Asp: servicereference Path = "~ /Bf_restaurant/bf_restaurant_service.asmx "/>
</Services>
</ASP: scriptmanager>
</Form>
</Body>
</Html>