Spot the web RSS 2.0
# Wednesday, January 09, 2008

If you are looking for a ASP.NET Google Map Control, your search is now over.

Jacob Reimers from http://www.reimers.dk/ offers a great asp.net control in 2 flavors.

The free version which lets you easily display a map with markers and/or lines and a licensed version which gives you the full power of Google Maps.

Download the free control, unzip it to your Bin folder in your web app and add a reference to it.

 

This is a sample asp.net page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map" TagPrefix="Reimers" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> 
    <title>Google Map test</title>
</head>
<body> 
    <form id="form1" runat="server"> 
        <div> 
            <reimers:googlemap id="GMap" runat="server" width="349" height="354" onmarkerclick="GMap_MarkerClick"  /> 
        </div> 
    </form>
  </body>
</html>

and the code behind:

using System;

using System.Web.UI;

using Reimers.Map;

 

public partial class _Default : Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

        GMap.GoogleKey = "Your API Code here";

        GMap.MapType = MapType.Map;

        GMap.TypeControl = MapTypeControl.None;

        GMap.MapControl = ControlType.Small;

 

        GoogleMarker testMarker = new GoogleMarker("newMarker", new GoogleLatLng(43.611611, -88.952931));

        testMarker.MarkerText = "Test Marker";

        GMap.Markers.Add(testMarker);

 

        GMap.Latitude = testMarker.Latitude;

        GMap.Longitude = testMarker.Longitude;

        GMap.Zoom = 10;

    }

 

    protected void GMap_MarkerClick(GoogleMap GMap, GoogleMarker Marker, ref String MapCommand)

    {

        MapCommand = Marker.OpenInfoWindowHTML(GMap, Marker.MarkerText);

    }

}

Wednesday, January 09, 2008 1:23:22 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
.Net | Google | Programming | Visual Studio | Web 2.0

Sometimes we need to make some write to logs, trace, and maybe limit some features during debug. It's good to know that in debug mode we have precompiler identifier DEBUG is set. So, first of all you can try #if #endif construction. In my opinion, it's not very good to use #if directive, especialy if there is something better.

Conditional attribute. It can be applied to any method that returns void. Why void? Because the method call ignored if the condition is not fulfilled. The method can be static or not.

[Conditional("DEBUG")]
static void DebugMethod()
{
}

So, this is the best way to make some job in DEBUG configuration. Also, it can be used to make different build configurations.

Wednesday, January 09, 2008 1:18:13 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
.Net | Programming | Visual Studio
# Tuesday, January 08, 2008

1. Web Developer Toolbar

The must have tool for any web developer.
Download Web Developer Toolbar

2. Firebug

Another must have extension for any developer. View, edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
Download Firebug

3. View Source Chart

Draws a color coded chart of a web page’s source code and includes automatic indentation to make source code easier to read.
Download Source Chart

4. HTML Validator

Adds HTML validation to the view page source of the browser.
Download HTML Validator

5. SEO Quake

Quick view of site parameters in the search engine results pages
Download SEO Quake

6. ColorZilla

This extension adds a small eyedropper tool to the bottom left of the status bar which when clicked upon allows you to hover over any part of a web page to view the colour that is being used.
Download ColorZilla

7. Colour Contrast Analyser

A nice accessibility extension to check whether there is sufficient contrast between foreground and background colours of a web page.
Download Colour Contrast Analyser

8. Foxmarks

The Foxmarks Bookmark Synchronizer automatically synchronizes your bookmarks between two or more computers running Firefox.
Download Foxmarks

9. Adblock

Not so much a development tool but useful nonetheless. This extension allows you to block adverts within web pages easily and effectively.
Download Adblock

10. Dust Me Selectors

Dust-Me Selectors is a Firefox extension that finds unused CSS selectors.
Download Dust Me Selectors

Tuesday, January 08, 2008 1:13:34 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
Design | Web 2.0 | Web Design
Navigation
Archive
<January 2008>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Guy Levin
Sign In
Statistics
Total Posts: 63
This Year: 0
This Month: 0
This Week: 0
Comments: 14
Themes
All Content © 2010, Guy Levin