Posts

Showing posts with the label 弘光,教學

Delphi取得HTTP

uses   idHttp; procedure THeaderFooterForm.FormCreate(Sender: TObject); var   s: String;   HTTP: TIdHTTP; begin   HTTP := TIdHTTP.Create;   s:='http://192.192.246.169/';   memo1.Lines.Text := HTTP.Get(s); end;

Android+Google Map API v3 Geocoding(地址轉經緯度度

Image
package wells.example.googlemapexample; import android.app.Activity; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import android.view.WindowManager; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout.LayoutParams; import android.widget.Toast; public class MainActivity extends Activity {  private static final String MAP_URL = "file:///android_asset/googleMap.html";  private WebView webView;  private EditText addressText;  private Button submit;  private boolean webviewReady = false;   @Override  /** Called when the activity is first created. */  public void onCreate(Bundle savedInstanceStat...

Android-使用webview在V3版的Google地圖GPS定位

Image
目的:透過GPS或網路定位來決定裝置目前的位置 程式執行動態畫面錄影: https://www.youtube.com/watch?v=_Bw2YP39WOw 畫面中可看到經緯度的資料約每隔一秒更新一次。 測試時必須要用GPS的模擬器播放預存的GPS記錄檔(KML)來模擬實際GPS抓到定位的資料,如下畫面: 程式要能接收GPS或網路的定位資料必須實作LocationListener介面,其中有幾個介面方法可以用在實際上的程式撰寫,像是定位資料的變化的相關方法「public void onLocationChanged(Location location」,其他像是偵測GPS裝置是否啟動或不啟動的方法。 主程式: package wells.example.googlemapexample; import android.app.Activity; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Button; import android.widget.EditText; public class MainActivity extends Activity implements LocationListener {  private static final String MAP_URL = "file:///android_asset/googleMap.html";  private WebView webView;  private EditText Lat...

Android-使用webview在V3版的Google地圖標註座標

Image
googlemaps.xml < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"     android:layout_width = "fill_parent"     android:layout_height = "fill_parent"     android:focusable = "true"     android:focusableInTouchMode = "true"     android:orientation = "vertical" >     < RelativeLayout         android:id = "@+id/RelativeLayout1"         android:layout_width = "fill_parent"         android:layout_height = "133dp"         android:focusable = "true"         android:focusableInTouchMode = "true" >         < TextView               android:id = "@+id/textView2"               android:layout_width = "wrap_content"             ...

Android-使用webview顯示V3版的Google地圖

Image
目的:使用Google Map API v3載入Google地圖。 專案目錄結構如下: 在assets目錄下放置專案要載入的googleMap.html, 內容如下: <!DOCTYPE html > <html>   <head>     <meta charset =" utf -8">     <title>Google Maps JavaScript API v3 Example: Marker Animations</title>     <link href ="/maps/documentation/ javascript /examples/default.css" rel =" stylesheet ">     <script src ="https://maps.googleapis.com/maps/api/js?sensor=false"></script>     <script>         var m1 = new google.maps.LatLng(24.217712, 120.580806); //弘光科技大學,台中市中棲路34號       var map;       function initialize() {         var mapOptions = {           zoom: 15,           mapTypeId: google.maps.MapTypeId.ROADMAP,           center: m1     ...

教育部2012全國技專校院學生實務專題製作競賽第2名

Image