August 31, 2006

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,

  • Trackbacks,
  • and Pingbacks

Comments are closed.

 

Trackbacks and Pingbacks


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

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

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

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

Shortcuts

Where is Dan?


My Blog
My Blog
Twitter
Twitter
Facebook
Facebook
LinkedIn
LinkedIn
Flickr
Flickr
YouTube
YouTube
Delicious
Delicious
Foursquare
Foursquare
Pinterest
Pinterest
GetGlue
GetGlue
Pintley
Pintley
XBOX Live
XBOX Live
Last.fm
Last.fm
Windows Live
Windows Live
Telligent.com
Telligent
Graffiti CMS on CodePlex
Graffiti CMS
Popular

Recent Posts