2013-10-30 88 views
1

Hie ,,,, 我剛剛下載了arcgis插件以在andriod手機上顯示地圖。當我使用示例代碼(HelloWorld)創建地圖時,我將URL更改爲[http://e1.onemap.sg/arcgis/rest/services/SN128/mapserver],當我運行該程序時,我看到的全部是空白,我等了將近10-30分鐘,但沒有任何顯示在我的手機上。 如果有人能真正告訴我我真的出錯了,我將不勝感激。Arcgis Esri沒有在Android設備上的地圖上顯示

這是我的XML代碼

<!-- MapView layout and initial extent --> 
<com.esri.android.map.MapView 
    android:id="@+id/map" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    initExtent = "-1.3296373526814876E7 3930962.41823043 -1.2807176545789773E7 4201243.7502468005"> 
</com.esri.android.map.MapView> 

</LinearLayout> 

我的HelloWorld Java類

public class HelloWorld extends Activity { 
MapView mMapView = null; 
ArcGISTiledMapServiceLayer tileLayer; 

    /** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 

    // Retrieve the map and initial extent from XML layout 
    mMapView = (MapView)findViewById(R.id.map); 
    /* create a @ArcGISTiledMapServiceLayer */ 
    tileLayer = new ArcGISTiledMapServiceLayer(
      //"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); 
      "http://e1.onemap.sg/arcgis/rest/services/SN128/mapserver"); 
      // Add tiled layer to MapView 
    mMapView.addLayer(tileLayer); 

} 


@Override 
protected void onPause() { 
    super.onPause(); 
    mMapView.pause(); 
} 

@Override 
protected void onResume() { 
    super.onResume(); 
    mMapView.unpause(); 
} 

這是我的logcat

此logcat的以藍色

10-30 17:17:33.417:D/dalvikvm(10277):GC_CONCURRENT釋放了234K,8%空閒9552K/10375K,暫停14ms + 3ms,總計38ms 10-30 17:17:33.497:D/ArcGIS .LifeCycle(10277):MapSurface初始化[email protected] 10-30 17:17:33.497:D/ArcGIS.LifeCycle(10277):map.onChildViewAdded 10-30 17:17:33.497 :d/ArcGIS.LifeCycle(10277):map.onChildViewAdded 10-30 17:17:33.502:d/ArcGIS.LifeCycle(10277):surface.addLayer - >http://e1.onemap.sg/arcgis/rest/services/SM128/mapserver


THIS logcat的In是RED COLOR

10-30 17:17:33.532:E/ArcGIS(10277):url = http://e1.onemap.sg/arcgis/rest/services/SM128/mapserver 10-30 17:17:33.532:E/ArcGIS(10277):com.esri.core.io.EsriServiceException:Not發現 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.core.internal.io.handler.ca(Unknown Source) 10-30 17:17:33.532:E/ArcGIS 10277):at com.esri.core.internal.io.handler.g $ 1.handleResponse(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.core.internal。 io.handler.g $ 1.handleResponse(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:773) 10-30 17:17:33.532:E/ArcGIS(10277):at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:743) 10-30 17:17:33.532:E/ArcGIS(10277):at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732) 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.core.internal.io.handler.ga(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.core.internal.io .handler.ga(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.core.internal.tasks.apa(Unknown Source) 10-30 17:17:33.532 :E/ArcGIS(10277):at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at com.esri.android。 map.ags.ArcGISTiledMapServiceLayer $ 1.run(Unknown Source) 10-30 17:17:33.532:E/ArcGIS(10277):at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:442) 10 -30 17 :17:33.532:E/ArcGIS(10277):在java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:305) 10-30 17:17:33.532:E/ArcGIS(10277):at java .util.concurrent.FutureTask.run(FutureTask.java:137) 10-30 17:17:33.532:E/ArcGIS(10277):在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor。java:1076) 10-30 17:17:33.532:E/ArcGIS(10277):at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:569) 10-30 17:17:33.532: E/ArcGIS的(10277):在java.lang.Thread.run(Thread.java:856)


並且這在藍背景

10-30 17:17:33.542: D/ArcGIS.LifeCycle(10277):map.onSizechanged 10-30 17:17:33.547:D /(10277):設備驅動程序API匹配 10-30 17:17:33.547:D /(10277):設備驅動程序API版本:10 10-30 17:17:33.547:D /(10277) :用戶空間API版本:10 10-30 17:17:33.547:D /(10277):mali:REVISION = Linux-r2p4-02rel0 BUILD_DATE = Thu Oct 25 08:43:05 KST 2012 10-30 17: 17:33.562:D/ArcGIS.LifeCycle(10277):>創建MapSurface.Context。 D/ArcGIS.LifeCycle(10277):MapSurface unpaused 10-30 17:17:33.587:D/ArcGIS.LifeCycle(10277):D/ArcGIS.LifeCycle(10277):MapSurface unpaused 10-30 17:17:33.587:D/ArcGIS.LifeCycle :MapSurface SurfaceCreated 10-30 17:17:33.587:D/ArcGIS.LifeCycle(10277):MapSurface SurfaceChanged:480,724 10-30 17:17:33.592:D/ArcGIS.Lock(10277):>> MapView等待surface.loaded 10-30 17:17:33.592:D/ArcGIS.Lock(10277):!! MapView鎖表面。加載

回答

0

除非您專門使用Microsoft軟件 - 並且ArcGIS來自Esri,而不是Microsoft - 您需要記住URLs are case-sensitive

http://e1.onemap.sg/arcgis/rest/services/SM128/mapserver

是不一樣的

http://e1.onemap.sg/ArcGIS/rest/services/SM128/MapServer

點擊他們都在瀏覽器中打開並看看會發生什麼。

嘗試第二個,你的應用程序應該工作。

+0

謝謝。但是當我運行它時,所有我看到的是藍色的顏色..地圖不會出現。有什麼我有地圖經緯度變化和日誌爲了我顯示地圖。? – FaridAvesko

+0

嘿,我明白了。謝謝您的幫助。真正appreaciate它。 C: – FaridAvesko

相關問題