Save the Manatees with SharePoint and Google Maps!

Today’s guest post is courtesy of Jamey Baxter who is a Computer Programs Analyst II/SharePoint Developer with the Office of Information Technology at the Florida Fish and Wildlife Conservation Commission. Jamey read my post on mapping a list with latitude and longitude and adding the name to the popup. He took the method and implemented it on a unique project I thought you would like to hear about it.

Along the way, Jamey updated the solution to work for the needs of the Commision. For example, if you are not using a Contacts list, remove the If statement that checks for the WorkAddress field. Also, you can re-enable paging, which I had turned off in my example.

-Tom

————————- Jamey’s Post Follows ————————————————————————-

This is an example of Google Map integration that we are starting to implement on our intranet at the Florida Fish and Wildlife Conservation Commission. The first site we are using this with is our Imperiled Species Management – Manatee Group which is a part of our Habitat and Species Conservation division. The overall implementation will eventually be deployed to any division that requests it that has lat/long coordinates associated with their projects. It quickly lets them view the locations of projects in relation to each other. It has also already allowed them to catch some incorrect lat/longs.

The page starts out with no selection, which makes the page load extremely fast since there are no markers or data to load into the dataview. This is accomplished by adding the dropdown as a dataview control filter which uses the counties as the filter. I input these into the dropdown manually due to their being a finite amount of counties and the original list also uses a static dropdown.

Once you select a county from the dropdown it places the markers on the map, recenters the map, sets the bounds, and builds the popup bubbles. Both the items in the dataview and the bubbles provide links to the original list item. Specific map site links are created by a separate workflow that builds a GoogleMaps hyperlink using the lat/long data and places it in the GMAP column. Also to prevent errors I placed an IF statement to filter out the items that did not have lat/longs from attempting to be placed on the map.

Zoom into Manatees Select

Getting this working will give us a very valuable and powerful tool that we can deploy for various SharePoint lists and will benefit our users greatly.

11 Comments
  1. This is a great application, and I would like to do something similar, but using a dropdown menu to select groups of monitoring wells. Is it possible to get the source code for the manatee application?

  2. Mark, Everything you need to accomplish that, including XSL source code is included in the other posts in this series including Followup to SharePoint Contacts List on a Map from Google

  3. I attempted to set up the map using latitude and longitude values for points, but am getting an error: Error Rendering Control unnamed 17
    The type is not registered as safe. I did obtain a google API key and inserted it in the code.

  4. Not sure if my last post went through. I tried to set everything up, including using a new Google API key, but received the following error in Sharepoint Designer while viewing Map Contacts.aspx:Error Rendering Control – Unnamed 17
    The type is not registered as safe. Any ideas?
    Thanks.

  5. Yes, I just started over and tried again, from Part 1. The google map displays, along with the contact list, but it doesn’t zoom in on the contact points or display them. Just the US map shows up. Does anything need to be done to allow Google cookies, etc.?

  6. Mark, you’re getting there. Sorry that I wasn’t clear. Part 1 does just what you explain. Part 2 adds the point on the map Mapping Part 2 Show a SharePoint Contacts List on a Map from Google
    Tom

  7. I’ve done Part 2 several times, and I get a US map with a list of the contacts displayed in 3 columns (First Name, Latitude, Longitude), but the map is not zooming or picking up the actual data points.

  8. Finally got it working, but had to remove the “not” from the if statement in Line 18 of the latlong xml file. I think possibly my data fields were blank for work address, workcity, etc., so my map wouldn’t zoom and plot points until the “not” was deleted.

    also, can you give me the email address for the Florida FW guy that developed the manatee code? I would like to create a dropdown filter menu similar to his.

    Thanks!

    Mark

  9. Tom:

    I have been able to enhance the Manatee example above by including different colored map icons associated with the menu selections (added a column for the icon color as a variable). Do you have an idea of how to have the leftmost column be linked to open the Info window, so the same action occurs as if you were clicking an icon on the map? This would be a very useful feature. I’ve tried, but have been unsuccessful so far.

    Thanks.

    Mark

  10. Mark,
    Thanks for being such a loyal follower of the mapping series and contributing so many comments! I love to hear from my readers.
    Your suggestion for popping up an info window is a great one and I plan to blog about it soon.
    If you still want to get in touch with Jamie, send me your email address by the contact form link on the top left of this blog and I will pass it on. -Tom

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.