Click here to Skip to main content
15,885,871 members
Articles / Web Development / ASP.NET

GHeat .NET

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
21 Jun 2010CPOL3 min read 222.8K   5.7K   53  
gheat ported to C#
Public Partial Class Map
    Inherits System.Web.UI.Page
    Protected googleMapsKey As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim lineSplit() As String
        Dim pm As gheat.PointManager

        'Switch the key based on the server name
        Select Case Request.ServerVariables("SERVER_NAME")
            Case "localhost"
                googleMapsKey = "ABQIAAAA6tmekeDSEFECjxSogk8CSBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRymIYx2Ki4BDvTjlwQ1_HJNKcojA"
            Case Else
                Throw New Exception("Server not found '" + Request.ServerVariables("SERVER_NAME") + "' So i cant get the google maps api key")
        End Select
        pm = SessionHandler.PointManager

        If pm.PointCount = 0 Then pm.LoadPointsFromFile("points.txt")
        pm.AddPoint(New GMap.NET.PointLatLng(30.123866, -92.070673))
        'For Each line As String In Request("Address").Split("|")
        '    lineSplit = line.Split(",")
        '    pm.AddPoint(New GMap.NET.PointLatLng(lineSplit(0), lineSplit(1)))
        'Next
        If Not Page.IsPostBack Then
            For Each item As String In gheat.GHeat.AvailableColorSchemes()
                colorSchemes.Items.Add(item)
            Next
        End If
    End Sub

End Class

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
Software Developer
United States United States
Graduate of University of Louisiana at Lafayette in computer science.

Comments and Discussions