Linkedin – Google Maps mash-up
My original idea for this web application was -
1) on signin, pull all connections
2) for each connection, get twitter id if available and the current location
3) show all the connections on map using locations
4) show last twitter update on hover on the map
Linkedin does not allow us to get twitter ids of our connections. So, I skipped part 2 and 4 in my development.
Here is the link to my application. Here are 2 main screenshots of my application -
I will document few important steps here -
Get API keys
Get Linkedin API key. Google Maps (use v3, since v2 is deprecated) does not need API key.
Note: I tried Yahoo maps first, but it wasn’t very accurate in plotting locations. I have blogged about it previously.
On login
When the user clicks on the login button, few things happen -
- Hide the “Login to see” text. The Linkedin button goes away automatically.
- Open the map in the div. Set the options to center it. Also, set the property minZoom: 2, to avoid the map to become very small (thus avoiding displaying the background image).
- Call API to obtain self profile information (like first name and last name – to go with the Welcome message) and to obtain all the connections of the logged in user.
Logic and code
- Get all connections.
- Find all unique locations from the connections data and put them in array. I used Jquery’s inArray plugin (found online) to add unique location names to the array.

- For every location name, send a request to Google Maps api to mark that location. This request is done using $.getJSON, but there is a cross-domain restriction. So,we cannot send the request directly. That’s why, I pass the location name to my proxy php file. In the php code, I use curl to send the http request and I get the markers array from Google maps.

- Parse the json data ie. markers array and fetch the latitude and longitude for each.

- Mark the positions on the map and set up event listeners on each marker for the click event.
- On click, get all the connections belonging to that location and display them in html.
Graphics
I created the logo and the background image to reflect what the application does. In the logo, I have created Linkedin-logo look-alike “IN” and then I have “World” with a little twirl on the “O” representing the equator of the world.
The background image depicts that you will get to see your 1st point contacts from linkedIn.
Recent Posts
- Portfolio redesign – version 3
- T-shirt design – Hack the Future 2
- Load time for my home page using Pingdom
- Whitehouse.gov web accessibilty evaluation
- Pirate game dialog box design
- Portfolio redesign – version 1 to version 2
- June update
- Bookworm – shopping cart application demonstrated
- Linkedin – Google Maps mash-up
- html11
Archives
- August 2011 (2)
- July 2011 (4)
- June 2011 (1)
- May 2011 (9)
- April 2011 (10)
- March 2011 (9)
- February 2011 (12)
- January 2011 (13)
- December 2010 (4)
- October 2010 (8)
- September 2010 (7)







