Dim URL As String =
"http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=HelloWorld"
Select Case CInt(Request("id"))
Case 1
URL = "http://chart.apis.google.com/chart?cht=p3&chs=420x180&chd=s:Hellob&chl=OtherRestPlayLocomoteForagingEat"
Case 2
URL = "http://chart.apis.google.com/chart?cht=p&chd=s:Uf9a&chs=350x220&chl=Water%20HoleRocky%20AreaTreesBushes"
Case 3
URL = "http://chart.apis.google.com/chart?cht=bhs&chs=300x200&chd=s:Hell8&chbh=30&chf=bg,s,FFF2CC&chxt=x,y&chxl=0:203040501:OctSepAugJulyJun"
End Select
' Get HTML data
Dim client As WebClient = New WebClient()
Dim b As Byte() = client.DownloadData(URL)
Dim response As System.Web.HttpResponse = System.Web.HttpContext.Current.Response
response.Clear()
response.AddHeader("Content-Type", "binary/octet-stream")
response.Flush()
response.BinaryWrite(b)
response.Flush()
response.End()
Wednesday, March 5, 2008
Monday, March 3, 2008
Android's MapView
Plotting a location using Google Maps and Android
xml layout:
{view class="com.google.android.maps.MapView"android:id="@+id/areamapview"android:layout_width="320px"android:layout_height="280px"/}
java code:
import these:
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.Point;
creation:
areaMapView = (MapView)this.findViewById(R.id.areamapview);
areaMapView.toggleSatellite();
Point areaPoint = new Point((int)(41.832846978094*1000000),(int)(-87.83592939376831*1000000));
mc = areaMapView.getController();
mc.animateTo(areaPoint);
mc.zoomTo(16);
xml layout:
{view class="com.google.android.maps.MapView"android:id="@+id/areamapview"android:layout_width="320px"android:layout_height="280px"/}
java code:
import these:
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.Point;
creation:
areaMapView = (MapView)this.findViewById(R.id.areamapview);
areaMapView.toggleSatellite();
Point areaPoint = new Point((int)(41.832846978094*1000000),(int)(-87.83592939376831*1000000));
mc = areaMapView.getController();
mc.animateTo(areaPoint);
mc.zoomTo(16);
Subscribe to:
Posts (Atom)