Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

MDI style web app using VisualJS.NET and Google Maps API

, 5 Oct 2012 CPOL
RAD sample of MDI style web app using VisualJS.NET with Google Maps.

Editorial Note

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.

VisualJS.NET_GoogleMaps_sample.ZIP
VisualJS.NET_GoogleMaps_sample
VisualJS.NET_GoogleMaps_sample
Global.asax
Properties
VisualJSApp
Helper
License
VisualJS.NET.license
Style
VisualJSSetup_1.039.zip
<%@ 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Michał Maniewski
Software Developer
Poland Poland
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411023.1 | Last Updated 5 Oct 2012
Article Copyright 2012 by Michał Maniewski
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid