Google Maps and Twitter example, grab the user location and map it on Google maps. Please note that the Google Maps api for flash now has full 3d support this does not go into how to use that but I will make my way back to this tutorial in a bit and elaborate on how to execute a 3d map in flash put for now this is just a ridiculously simple example of how to integrate a twitter map with Google quickly. For this example I simply picked up the Google map api swc and followed the geocoding example. I simply pass in the twitter location of the user to the geocoding services and it automagically maps my results no real frills just simple and quick example.


Simple Google Maps and Twitter

Flash Twitter and Google Map Integration:



 
 
  
 
  
 
 
     0) {
            map.setCenter(placemarks[0].point);
            var marker:Marker = new Marker(placemarks[0].point);
            marker.addEventListener(MapMouseEvent.CLICK, function (event:MapMouseEvent):void {
				var mainTweet:String = new String(userTwitter + " - User - Tweet:" + userTweets);
                marker.openInfoWindow(new InfoWindowOptions({content: mainTweet}));
            });
            map.addOverlay(marker);
          }
        });
		geocoder1.addEventListener(
          GeocodingEvent.GEOCODING_FAILURE,
          function(event:GeocodingEvent):void {
            //Alert.show("Geocoding failed");
            trace(event);
            trace(event.status);
          });
        geocoder1.geocode(address.text);
      }
	  
	  
		
    ]]>
  


Code

Simple Google Maps and Twitter Geocoding

Simple Google Maps Geocoding