Digging My Blog - Dan Hounshell

Another .Dan Powered Site

Using the DH Simple Google Map Wrapper in CS profile page

Yesterday I talked about my CS/Google mashup and showed an example, my profile. Today I provide the instructions for using my Simple Google Map Wrapper in CS profile page:

1. Download the source or the binary here.

2. Place the DanHounshell.Google.Maps.OneMarkerMap dll in your /Web/bin folder.

3. Open the /Web/Themes/default/Skins/Skin-UserProfile.ascx page

        1. Register the assembly by pasting the following to the top of the page (after the other register and import statements):

<%@ Register TagPrefix="DHGM" Namespace="DanHounshell.Google.Maps" Assembly="DanHounshell.Google.Maps" %>

        2. Paste the following after the other script blocks:

<script language="C#" runat="server">
    protected override void OnPreRender(EventArgs e) {
        base.OnPreRender(e);
        map.Address = Location.Text;
    }
</script>

        3. Find the table row that includes the Location field.  Underneath it add a new row like this:

<tr>
     <td colspan="2">
          <DHGM:OneMarkerMap ID="map" runat="server" GoogleMapsAPIKey="YourAPIKey" Address="" Zoom="4" />
     </td>
</tr>

That's all there is to it. You can apply this in other places besides the CS profile page by following the above example.

You cat get a Google Maps API key here

Give me a shout if you have any questions.

Additionally - the code does not have a bunch of error checking or any other "fancy" stuff - it was more or less just a proof of concept. The version number is 0.1, so it is pre-pre-beta. It is offered as-is, no warranties expressed or impled, etc.  The source is there for you to peruse - it's pretty simple stuff actually.


Comments

Community Server Daily News said:

from the editor occasional messages that don't fit anywhere else We'll be adding a weekly recap of the

# September 1, 2006 12:22 PM

Daily News Faq List said:

Dan Hounshell adds installation details to his fun Google Map Profile Page wrapper .

# November 22, 2006 8:21 AM

Digging My Blog - Dan Hounshell said:

Ryan W posed a challenge to me in comments he left to my "I'm sick and tired of this weather and I want

# February 20, 2007 12:28 PM

Community Server Bits said:

Dan Hounshell adds installation details to his fun Google Map Profile Page wrapper .

# March 12, 2007 8:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Please type in: hello world