POST
|
I ran into a similar problem while refactoring my app that was based on the beta api. The fix for me was to open a sample ArcGIS app (in Eclipse, File > New > Other > ArcGIS for Android > ArcGIS Samples for Android) and copy the lib folder to my project. Sorry for not being more specific, I don't have my development machine in front of me at the moment. Hope this helps!
... View more
01-26-2012
06:28 PM
|
0
|
0
|
892
|
POST
|
In Eclipse, you can also try File > New > Other > ArcGIS for Android > ArcGIS Samples for Android > Next. In the following window, you should see all of the sample apps.
... View more
01-13-2012
08:30 AM
|
0
|
0
|
349
|
POST
|
Here's how I used it with a dynamic layer: ArcGISDynamicMapServiceLayer dynamicLayer = new ArcGISDynamicMapServiceLayer(dynamicMapURL); map.addLayer(dynamicLayer); float layerOpacity = 0.5f; dynamicLayer.setOpacity(layerOpacity);
... View more
01-13-2012
08:02 AM
|
0
|
0
|
310
|
POST
|
You can try the sample app called Nearby that is included with the SDK. I've also included a code snippet that you can add to an Options Menu button (or on-screen button, etc.): LocationService ls = map.getLocationService(); if (ls.isStarted() == false) { ls.setAutoPan(false); ls.start(); Point point = ls.getPoint(); map.zoomToScale(point, 60000); Toast.makeText(YourActivityName.this, "Select My Location again to disable GPS",Toast.LENGTH_SHORT).show(); } else { ls.stop(); };
... View more
01-13-2012
07:58 AM
|
0
|
0
|
349
|
POST
|
You could add an if statement to your menu button:
LocationService ls = map.getLocationService();
if (ls.isStarted() == false) {
ls.start();
}
else {
ls.stop();
};
... View more
01-07-2012
12:16 AM
|
0
|
0
|
348
|
POST
|
You can check out the app here: https://market.android.com/details?id=gov.honolulu.floodzones This version is using an older release of the api. I'm basically trying to recompile the app using the new sdk and submit the update to the market. Not sure if you saw my other issue about enabling caching to the storage device (i.e. sd card), but that's pretty much the only thing holding me back from submitting the new apk. Any help with that would be great.
... View more
01-03-2012
08:10 AM
|
0
|
0
|
371
|
POST
|
The relevant code from the java file:
MapView map = null;
String baseMapURL = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
String dynamicMapURL = "http://gis.hicentral.com/arcgis/rest/services/OperPublicSafety/MapServer";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.floodzones);
map = (MapView) findViewById(R.id.map);
initextent = new Envelope(-17622457.3032347, 2439157.37937499, -17546524.1970318, 2457953.93517276);
map.setExtent(initextent, 0);
ArcGISTiledMapServiceLayer baseMap = new ArcGISTiledMapServiceLayer(baseMapURL);
this.map.addLayer(baseMap);
ArcGISDynamicMapServiceLayer dynamicLayer = new ArcGISDynamicMapServiceLayer(dynamicMapURL);
this.map.addLayer(dynamicLayer);
dynamicLayer.refresh();
}
And from the layout xml:
<com.esri.android.map.MapView
android:id="@+id/map"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
initExtent="-17622457.3032347 2439157.37937499 -17546524.1970318 2457953.93517276">
</com.esri.android.map.MapView>
... View more
12-30-2011
11:49 AM
|
0
|
0
|
371
|
POST
|
Please try right-clicking and saving the link as: http://dl.dropbox.com/u/44596312/basemap%20not%20available.mp4 I was just able to download and view the video again.
... View more
12-29-2011
11:26 AM
|
0
|
0
|
371
|
POST
|
It doesn't happen with any one layer in particular but you can try this one: http://gis.hicentral.com/ArcGIS/rest/services/OperPublicSafety/MapServer Like I mentioned in my previous reply, it seems that calling refresh() after adding the layer helps.
... View more
12-29-2011
11:22 AM
|
0
|
0
|
292
|
POST
|
I've been experimenting with adding refresh() right after adding the dynamic layer to the MapView and it seems to be working well. The dynamic layer now consistently displays upon opening the app. But if anyone has other suggestions, I'm all ears. Thank you!
... View more
12-23-2011
03:11 PM
|
0
|
0
|
292
|
POST
|
Aloha, My second SDK 1.0.1 issue is that sometimes my dynamic layer does not load, all I see is the basemap. However, if I rotate my device, the dynamic layer is then loaded. Here is a video of the behavior: http://dl.dropbox.com/u/44596312/dynamic%20layer%20loads%20after%20rotate.mp4 What can I do to make sure the dynamic layer is consistently displayed (without the need to rotate the device)? Mahalo!
... View more
12-21-2011
01:51 PM
|
0
|
5
|
2684
|
POST
|
Aloha, Since updating my apps from the beta API to SDK 1.0.1, I've run into a few issues. I'll create separate threads for the sake of clarity. The first issue is when opening the app, sometimes the basemap is unavailable and tiles that say "Map data not yet available" show up instead. Here is a video of the behavior: http://dl.dropbox.com/u/44596312/basemap%20not%20available.mp4 I don't remember experiencing this with the beta API. Is there a way to address this with SDK 1.0.1? Mahalo!
... View more
12-21-2011
01:44 PM
|
0
|
6
|
523
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|