views:

196

answers:

3

Has anyone seen an implementation of Google Maps using LinkedIn group information?

Specifically I would like to plot the location of members within a group as pins on a Google Map.

Any help or guidance would be great.

Thanks.

+2  A: 

If you are able to get the location of your LinkedIn group members, you can geocode their addresses with the Google Maps HTTP Geocoding API as follows:

Simple CSV:

http://maps.google.com/maps/geo?q=Oxford+Street,+London&output=csv&sensor=false

More Complex XML:

http://maps.google.com/maps/geo?q=Oxford+Street,+London&output=xml&sensor=false

Simply change the "q" parameter with the address.

You will receive the Latitude and Longitude of each address through geocoding. Then it is simply a matter of putting the markers on the map in the browser through JavaScript:

map.addOverlay(new GMarker(new GLatLng(GEOCODED_LAT, GEOCODED_LON)));
Daniel Vassallo
+1  A: 

Thanks Daniel. I'm familiar with Google Maps but it is the LinkedIn feed side that I'm unfamiliar with.

Is there a way to get the location of group members via a feed of some sort? Assuming I was the group owner.

Brett Cooper
Welcome to Stack Overflow. Generally you should comment on an answer rather than answering yourself.
Blair McMillan
Unfortunately, until enough points are earned, you can't comment on anything except your own. I've seen people write "answer comments" as comments to the question itself, though.
Ioan
I was under the impression that you could always comment on your own answers and also answers to your own questions. Edit: You can. From the FAQ - "you can always comment on your questions and answers, and any answers to questions you've asked, even with 1 rep."
Blair McMillan
Good to know, thank you. Apparently, I missed that part.
Ioan
+3  A: 

According to the LinkedIn Developer API, a request to a users profile will return:

<person>
  ...
  <location>
    <name>
    <country>
      <code>
    </country>
  </location>
  ...
</person>

Which you should then be able to Geocode into the Lat/Long points.

It all really depends on whether you can get a list of people in a group. Apparently there's not much support for groups API yet.

Blair McMillan
@Blair: Good answer regarding the LinkedIn API. Note however that reverse geocoding is when you have lat/lon and you get returned an address. The opposite (address to lat/lon) is required, which is normal geocoding.
Daniel Vassallo
Very true. I've updated my answer. Cheers.
Blair McMillan