gpt4 book ai didi

java - Arcgis Esri未显示在Android设备上的 map 上

转载 作者:行者123 更新时间:2023-12-01 04:13:24 26 4
gpt4 key购买 nike

嗨,,,,
我刚刚下载了arcgis Pluggin来在Andriod手机上显示地图。当我使用示例代码(HelloWorld)创建地图时,我将网址更改为[http://e1.onemap.sg/arcgis/rest/services/SN128/mapserver],当我运行该程序时,看到的只是空白,我等待了将近10-30分钟,但手机上没有任何显示。
如果有人真的可以告诉我我真正在哪里出错,我将不胜感激。

这是我的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初始化com.esri.android.map.MapSurface@41996608
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



此LOGCAT为红色

10-30 17:17:33.532:E / ArcGIS(10277):网址= http://e1.onemap.sg/arcgis/rest/services/SM128/mapserver
10-30 17:17:33.532:E / ArcGIS(10277):com.esri.core.io.EsriServiceException:找不到
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.io.handler.c.a(未知来源)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.io.handler.g $ 1.handleResponse(未知源)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.io.handler.g $ 1.handleResponse(未知源)
10-30 17:17:33.532:E / ArcGIS(10277):位于org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:773)
10-30 17:17:33.532:E / ArcGIS(10277):位于org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:743)
10-30 17:17:33.532:E / ArcGIS(10277):位于org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.io.handler.g.a(未知来源)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.io.handler.g.a(未知来源)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.core.internal.tasks.a.p.a(来源不明)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initLayer(未知来源)
10-30 17:17:33.532:E / ArcGIS(10277):在com.esri.android.map.ags.ArcGISTiledMapServiceLayer $ 1.run(未知源)
10-30 17:17:33.532:E / ArcGIS(10277):在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):在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):在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):马里:REVISION = Linux-r2p4-02rel0 BUILD_DATE =星期四10月25日08:43:05 KST 2012
10-30 17:17:33.562:D / ArcGIS.LifeCycle(10277):> MapSurface.Context已创建。 com.esri.android.map.MapSurface@41996608
10-30 17:17:33.562:D / ArcGIS.LifeCycle(10277):MapSurface未暂停
10-30 17:17:33.587:D / ArcGIS.LifeCycle(10277):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锁定surface.loaded

最佳答案

除非您仅使用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

单击它们两者以在浏览器中打开并查看会发生什么。

尝试第二个,您的应用程序应该可以运行。

关于java - Arcgis Esri未显示在Android设备上的 map 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19677978/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com