# Twitter & Google API

**URL:** <https://forum.kirupa.com/t/twitter-google-api/301165>\
**Category:** flash\
**Created:** [December 4, 2009, 11:10am UTC](https://forum.kirupa.com/t/twitter-google-api/301165 "2009-12-04T11:10:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knorrad](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@knorrad](https://forum.kirupa.com/u/knorrad)\
**Post date:** [December 4, 2009, 11:10am UTC](https://forum.kirupa.com/t/twitter-google-api/301165/1 "2009-12-04T11:10:15Z")

</div>

HELLO EVERYONE!

I am trying to combine two of the tutorials on gotoAndLearn. The Google-maps and the Search-twitter one. If your not familiar with thoose topics, dont worry, just help me ![](http://forum.kirupa.com/uploads/kirupa/4990/9159c015948af455.gif)

I am trying do create a RIA, which shows a google-map with pin-points defined in a php-file, onClick i want to be able to show either information DIRECTLY from the twitter RSS or \*for example from the wordress API/RSS  
\*. This information will be shown directly at the pinpoint (like a tooltip).

I’m a rookie on AS3 and I work in Flex Builder 3.

\<?xml version=“1.0” encoding=“utf-8”?\>  
\<mx:Application xmlns:mx=“[http://www.adobe.com/2006/mxml](http://www.adobe.com/2006/mxml)” layout=“absolute”  
xmlns:maps=“com.google.maps.\*”\>

```
&lt;mx:Script&gt;
		&lt;![CDATA[

		
		import com.google.maps.overlays.MarkerOptions;
		import com.google.maps.overlays.Marker;
		import mx.collections.ArrayCollection;
		import mx.rpc.events.ResultEvent;
		import com.google.maps.controls.MapTypeControl;
		import com.google.maps.controls.ZoomControl;
		import com.google.maps.MapType;
		import com.google.maps.LatLng;
		import com.google.maps.MapEvent;
		import org.swxformat.*;
		
		[Embed(source="AK47.png")]
		private var ak:Class;
		
		private function onReady(e:MapEvent):void
		{
			map.setCenter(new LatLng(59.33023333333333, 18.0592), 14, MapType.PHYSICAL_MAP_TYPE);
			map.addControl(new ZoomControl());
			map.addControl(new MapTypeControl());
			service.send();
			theService.send();
		}
		
		private function onResult(e:ResultEvent):void
		{
			var list:ArrayCollection = e.result.map.loc;
			for(var i:int=0; i&lt;list.length; i++)
			{
				var bm:Bitmap = new ak() as Bitmap;
				var m:Marker = new Marker(new LatLng(list*.lat, list*.lon),
											new MarkerOptions({ **tooltip:list*.name** ,
																icon:bm,
																iconOffset:new Point(-59, -31)}));
				map.addOverlay(m);
			}
		}
		

	]]&gt;
&lt;/mx:Script&gt;
&lt;mx:HTTPService id="theService" url="http://twitter.com/statuses/user_timeline/8035032.rss" /&gt;

&lt;mx:List dataProvider="{**theService.lastResult.rss.channel.item[0]**}" labelField="title" top="40" left="10" 
	right="10" bottom="100" id="theList"&gt;&lt;/mx:List&gt;

&lt;mx:HTTPService id="service" url="map.php" result="onResult(event)"/&gt;

&lt;maps:Map width="100%" height="100%" id="map" mapevent_mapready="onReady(event)"
	key="ABQIAAAAygn08KtrPHRID57cCzRochT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQgujvgsY9T-1xHRx_tQQgNFe2vEA"/&gt;

```

\</mx:Application\>

I have highlighted the two data-lines i want to swap, if someone could help me with this, I think i could finish the rest!

Thanks!
