|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="VisualJS.NET_GoogleMaps_sample.VisualJSApp.VSJS_SamplePage" %>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample Page</title>
<link rel="shortcut icon" href="http://www.visualjs.net/favicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta content="text/javascript" http-equiv="Content-Script-Type" />
<meta content="text/css" http-equiv="Content-Style-Type" />
<meta id="MetaDescription" name="DESCRIPTION" content="VisualJS.NET Web Application" />
<meta id="MetaCopyright" name="COPYRIGHT" content="Copyright 2012 zondig!" />
<meta id="MetaAuthor" name="AUTHOR" content="VisualJS.NET" />
<!-- Useful settings for mobile browsers -->
<meta name="viewport" content="initial-scale=1.0;maximum-scale=1.0; user-scalable=no;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="HandheldFriendly" content="true" />
<!-- <link href='/VisualJSApp/Style/CustomStyle.css' media='screen' rel='stylesheet' type='text/css' /> -->
<link href='a.PokeIn?name=VSJS_CSS&type=text' media='screen' rel='stylesheet' type='text/css' />
<!--VisualJS Script Library Codes.-->
<script type='text/javascript' src='b.PokeIn?name=VSJS_JSS&type=text' charset='UTF-8'></script>
<!--VisualJS Connection Routine.-->
<script type="text/javascript" src="c.PokeIn?VisualJS=1&rnd=<%=DateTime.Now.Millisecond.ToString()%>"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true">
</script>
<script type="text/javascript">
var maps = new Array();
var geocoder;
function initialize(windowNumber) {
geocoder = new google.maps.Geocoder();
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true
};
maps[windowNumber] = new google.maps.Map(document.getElementById("map_canvas" + windowNumber), mapOptions);
}
function FindLocation(location, windowNumber) {
var map = maps[windowNumber];
geocoder.geocode({ 'address': location }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
</script>
</head>
<body>
<script type="text/javascript">
//VisualJSLoaded event handler
document.VisualJSLoaded = function () {
//Show the MainForm
VSJS.GMapsSampleForm.Show();
//Form OnClose Event
VSJS.GMapsSampleForm.OnClose = function () {
if (PokeIn.IsConnected) {
PokeIn.Close();
};
if (!PokeIn.PageUnloading) {
setTimeout(PokeIn.ReConnect, 500);
};
};
initialize(0);
};
</script>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.