#  Monday, July 21, 2008
Posted in

I spent a few hours today figuring out why the Google GeoCoder API was returning the error code “602” ( G_GEO_UNAVAILABLE_ADDRESS ) for an address in Clinton Township Michigan, but finds the address on the Google Maps page.

 

From what I gather from researching this issue is that Google possibly uses 2 different sets of data for Geocoding. One for their own use on Google Maps and another for their Google Maps API.

One solution that I discovered while testing data against their API was to check the Status code for a “602” error and then resubmit the information while leaving out the City information. This resulted in the API getting the Latitude and Longitude for the address.

 

Hopefully this will work for all addresses that return this error until Google updates this 2nd set of data or uses the same data source for both.

Monday, July 21, 2008 6:18:46 PM (Eastern Daylight Time, UTC-04:00)   #     Comments [0] -

#  Thursday, January 03, 2008
Posted in  | 

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.

 

I have used this control on a few of Web Solutions clients sites. Two of the better implementations are Low Index and Seville Homes.

 

*The deals listed below are entirely fictional. They were created for presentation purposes only.

 

lowIndex

seville

 

 

 

To use this great control, head over to http://www.reimers.dk/, 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" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<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);

    }

}

Thursday, January 03, 2008 9:33:58 PM (Eastern Standard Time, UTC-05:00)   #     Comments [5] -

Advertisments
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
Statistics
Total Posts: 8
This Year: 7
This Month: 0
This Week: 0
Comments: 12
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 2008
Chris Newman
Sign In