Click here to Skip to main content
15,895,772 members
Articles / Hosted Services / Azure

GPS Runner Maps: My First Windows Azure Application

Rate me:
Please Sign up or sign in to vote.
4.90/5 (12 votes)
20 Dec 2009CPOL3 min read 55.3K   3.1K   63  
It is "cloud" Web application to display GPS tracks on Google or Bing maps
<%@ Page Language="C#" MasterPageFile="~/Default.master" AutoEventWireup="true" Title="<%$Resources:Res,trackDetails %>"
  CodeBehind="TrackDetails.aspx.cs" Inherits="GpsRunnerMaps_WebRole.TrackDetails"
  EnableEventValidation="false" %>

<%@ Register Assembly="Microsoft.Live.ServerControls.VE" Namespace="Microsoft.Live.ServerControls.VE"
  TagPrefix="ve" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ MasterType VirtualPath="~/Default.master" %>
<%@ Register Src="Countries.ascx" TagName="Countries" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Left" runat="server">
  <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="_updatePanel" runat="server">
    <ProgressTemplate>
      <asp:Panel ID="_panelWait" runat="server" BackColor="White" Style="z-index: 500;
        margin: -100px 0 0 -50px; padding: 5; position: absolute; border: solid 1px black">
        <asp:Label ForeColor="Black" ID="litwait" runat="server" Text="<%$Resources:Res,plsWait %>"
          Font-Bold="true" /><br />
        <img src="icons/activityanimation.gif" /><br />
      </asp:Panel>
      <ajax:AlwaysVisibleControlExtender ID="ace" runat="server" TargetControlID="_panelWait"
        Enabled="true" HorizontalSide="Center" VerticalSide="Middle" />
    </ProgressTemplate>
  </asp:UpdateProgress>
  <asp:UpdatePanel runat="server" ID="_updatePanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
    <ContentTemplate>
      <asp:Panel runat="server" ID="panel2" GroupingText="<%$Resources:Res,pointSelection %>">
        <table>
          <tr>
            <td>
              <asp:Literal ID="Literal4" Text="<%$Resources:Res,point1 %>" runat="server" />
            </td>
            <td>
              <asp:DropDownList ID="ddlPoint1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPoint_SelectedIndexChanged" />
            </td>
          </tr>
          <tr>
            <td>
              <asp:Literal ID="Literal6" Text="<%$Resources:Res,point2 %>" runat="server" />
            </td>
            <td>
              <asp:DropDownList ID="ddlPoint2" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPoint_SelectedIndexChanged" />
            </td>
          </tr>
        </table>
      </asp:Panel>
      <br />
      <asp:Panel runat="server" ID="panel3" GroupingText="<%$Resources:Res,statistics %>">
        <table>
          <tr>
            <td>
              <asp:Literal ID="Literal5" Text="<%$Resources:Res,distance %>" runat="server" />
            </td>
            <td>
              <asp:Label ID="lblDistance" runat="server" Font-Bold="true" />
            </td>
          </tr>
          <tr>
            <td>
              <asp:Literal ID="Literal7" Text="<%$Resources:Res,interval %>" runat="server" />
            </td>
            <td>
              <asp:Label ID="lblTimeInterval" runat="server" Font-Bold="true" />
            </td>
          </tr>
          <tr>
            <td>
              <asp:Literal ID="Literal8" Text="<%$Resources:Res,meanVel %>" runat="server" />
            </td>
            <td>
              <asp:Label ID="lblMeanVel" runat="server" Font-Bold="true" />
            </td>
          </tr>
          <tr>
            <td>
              <asp:Literal ID="Literal1" Text="<%$Resources:Res,meanPace %>" runat="server" />
            </td>
            <td>
              <asp:Label ID="lblMeanPace" runat="server" Font-Bold="true" />
            </td>
          </tr>
          <tr>
            <td>
              <asp:Literal ID="Literal9" Text="<%$Resources:Res,meanAlt %>" runat="server" />
            </td>
            <td>
              <asp:Label ID="lblMeanAlt" runat="server" Font-Bold="true" />
            </td>
          </tr>
        </table>
      </asp:Panel>
      <br />
      <asp:Panel ID="_animationPanel" runat="server" GroupingText="<%$Resources:Res,mapAnimation %>">
        <asp:Timer ID="_timer1" runat="server" Enabled="false" Interval="3000" OnTick="_timer1_Tick">
        </asp:Timer>
        <table>
          <tr>
            <td>
              <asp:Label ID="lblOther" runat="server" Text="<%$Resources:Res,animationInterval %>" />
            </td>
            <td>
              <asp:DropDownList runat="server" ID="_animInterval">
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
              </asp:DropDownList>
              sec
            </td>
          </tr>
          <tr>
            <td>
              <asp:Label ID="Label1" runat="server" Text="<%$Resources:Res,showOtherPoint %>" />
            </td>
            <td>
              <asp:DropDownList runat="server" ID="_animShowOneOf">
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
              </asp:DropDownList>
            </td>
          </tr>
          <tr>
            <td colspan="2">
              <asp:Button ID="_startAnimation" runat="server" Text="<%$Resources:Res,start %>"
                OnClick="_startAnimation_Click" />&nbsp;
              <asp:Button ID="_pauseAnimation" runat="server" Text="<%$Resources:Res,pause %>"
                OnClick="_pauseAnimation_Click" />&nbsp;
              <asp:Button ID="_stopAnimation" runat="server" Text="<%$Resources:Res,stop %>" OnClick="_stopAnimation_Click" />&nbsp;
            </td>
          </tr>
        </table>
      </asp:Panel>
      <br />
      <asp:Panel ID="_googleMapsLinkPanel" runat="server" GroupingText="<%$Resources:Res,createGoogleMapsLink %>">
        <br />
        <asp:CheckBox runat="server" ID="_chkPanoramio" Text="<%$Resources:Res,showPanoramioPhotos %>"
          Checked="true" AutoPostBack="true" />
        <br />
        <asp:CheckBox runat="server" ID="_chkWikipedia" Text="<%$Resources:Res,showWikipediaLinks %>"
          Checked="true" AutoPostBack="true" />
        <br />
        <asp:Literal runat="server" Text="<%$Resources:Res,style %>" />&nbsp;
        <asp:DropDownList runat="server" ID="_ddlGoogleMapType" AutoPostBack="true">
          <asp:ListItem Selected="True" Text="Map" Value="m" />
          <asp:ListItem Text="Satellite" Value="k" />
          <asp:ListItem Text="Hybrid" Value="h" />
          <asp:ListItem Text="Terrain" Value="p" />
        </asp:DropDownList>
        <br />
        <br />
        <asp:HyperLink runat="server" ID="_googleHL" Target="_blank" Text="<%$Resources:Res,showGoogleMapsLink %>" />
      </asp:Panel>
      <asp:Panel ID="_veMapsLinkPanel" runat="server" GroupingText="<%$Resources:Res,createVEMapsLink %>">
        <br />
        <asp:Literal ID="Literal2" runat="server" Text="<%$Resources:Res,style %>" />&nbsp;
        <asp:DropDownList runat="server" ID="_ddlVeMapType" AutoPostBack="true">
          <asp:ListItem Selected="True" Text="Map" Value="r" />
          <asp:ListItem Text="Satellite" Value="a" />
          <asp:ListItem Text="Hybrid" Value="h" />
        </asp:DropDownList>
        <asp:HyperLink runat="server" ID="_veHL" Target="_blank" Text="<%$Resources:Res,showVEMapsLink %>" />
      </asp:Panel>
    </ContentTemplate>
  </asp:UpdatePanel>
</asp:Content>

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)


Written By
Web Developer Forthnet
Greece Greece
Software developer and Microsoft Trainer, Athens, Greece (MCT, MCSD.net, MCSE 2003, MCDBA 2000,MCTS, MCITP, MCIPD).

Comments and Discussions