POST
|
I have to check if there is something better in the new SDK but I did it like this:
......JsonFactory h = new JsonFactory();
JsonParser parser = h.createJsonParser(webMapString);
// this is needed to get a valid jsonparser
parser.nextToken();
// get a new WebMap instance
return WebMap.newInstance(parser, null,
SpatialReference.create(DEFAULT_SPACIAL_REFERENCE));.........
... View more
02-21-2013
07:56 AM
|
0
|
0
|
504
|
POST
|
It works fine for me on Windows 7/8. I don't know about any software center but I just did this: In Eclipse: Help Menu --> Install new software --> Add --> entered a name and then just pressed archive and added the zip file. Worked many times now...
... View more
08-28-2012
12:54 AM
|
0
|
0
|
200
|
POST
|
Simon, I've tried setting it to false after generating the map image, and i've tried calling destroyDrawingCache() and getDrawingCache().recycle();. None of them seem to solve the problem. -Andrew Thanks for your help. I've tried these things too, but nothing helped. Unfortunately I'm just an intern and I don't have any support contract or something like that so I can't look at your incident or call the support myself. Let me know if there are any news on your request. Did they say something about the callout not showing in the bitmap also?
... View more
08-20-2012
12:40 AM
|
0
|
0
|
565
|
POST
|
I guess the map has no layer. You need to add a layer to the map, so it can load something. Look here at section 6: http://resources.arcgis.com/en/help/android-sdk/concepts/index.html#/Hello_World_Map/011900000005000000/
... View more
08-19-2012
10:37 PM
|
0
|
0
|
175
|
POST
|
Hi! I have to report, that the bug discussed here http://forums.arcgis.com/threads/46792-mapview.getMapDrawingCache%28%29-returns-null is only partly fixed for me. As said in that thread: The problem is that when the bitmap is the entire map there is a lag in generating the bitmap. If the bitmap is a smaller area the lag is unnoticeable. This a bug we are fixing. The code posted earlier if executed twice works without a problem. Try using the code below, if you single tap on the map twice you will see the bitmap. map.setOnSingleTapListener(new OnSingleTapListener() { /** * */ private static final long serialVersionUID = 1L; public void onSingleTap(float arg0, float arg1) { Polygon polygon = map.getExtent(); Envelope env = new Envelope(); polygon.queryEnvelope(env); Bitmap bitmap = map.getDrawingMapCache(arg0, arg1, 100, 100)); // Bitmap bitmap = map.getDrawingMapCache(0, 0, // map.getWidth(), map.getHeight())); Log.d(TAG, "width = " + map.getWidth() + " ht = " + map.getHeight()); ImageView img = new ImageView(HelloWorld.this); img.setImageBitmap(bitmap); map.addView(img); } }); Thanks Archana If you get the drawingcache from your whole mapview like this map.getDrawingMapCache(0f, 0f,mMapView.getWidth(), mMapView.getHeight())); it becomes really unresponsive and simply unusable. If the area is smaller like for example 200x200 there is no noticeable drop in responsiveness. And sometimes I still need to call the method more then one time (but 2 times max). I have tested this with SDK v1.1, v1.1.1 and v2.0 on a Galaxy Tab 10.1n, Galaxy S 2.3.6 and a Galaxy Nexus with 4.1.1 with our ArcGIS Server 10.03. Unfortunately I can not provide any logs, because there are none for this bug.
... View more
08-16-2012
10:18 PM
|
0
|
9
|
2587
|
POST
|
If I understand you correctly you can just create and show a progressdialog when you add the layer and disable it in the onstatuschangedlistener of your mapview when "layerloaded" is called with the id/name/etc. of your added layer.
... View more
08-16-2012
09:43 PM
|
0
|
0
|
296
|
POST
|
Ah I overread that. It looks like you have to do that... Else you would have to provide a server and download the data on your own at the first start or so
... View more
08-16-2012
04:14 AM
|
0
|
0
|
297
|
POST
|
I guess it would be possible. As long as the path is alright there should be no problem from what I can see here: http://developer.android.com/guide/google/play/expansion-files.html
... View more
08-16-2012
03:53 AM
|
0
|
0
|
297
|
POST
|
Ah ok. Could be tricky. You could try to cast the desired Layer element back to a ArcGISDynamicmapservicelayer. Remove the "old" one from the mapview. Change your visibilitys of the the layer and re-add it to the mapview. I don't know if this works. Maybe also debugging the longpress method. MapView.isLoaded() could be a little funny on what it reports in earlier versions of the SDK. I guess andygup could help you better with this...
... View more
08-13-2012
10:33 PM
|
0
|
0
|
592
|
POST
|
...
if(mMapView.isLoaded()){
ArcGISLayerInfo[] layers = ams.getLayers();
//this layer is what I want
if(layers[1].isVisible())
layers[1].setVisible(false);
}
}
});
}
... You need to get the layers from the mapview not the ams. If a layer (ArcGISDynamic/ArcGISTiled,...) is not directly in a mapview it will not be loaded and you can't work with it. Your code would have to look something like this:
if(mMapView.isLoaded()){
Layers[] layers = mMapView.getLayers();
//this layer is what I want
if(layers[1].isVisible())
layers[1].setVisible(false);
}
... View more
08-13-2012
09:51 PM
|
0
|
0
|
594
|
POST
|
http://resources.arcgis.com/en/help/android-sdk/concepts/index.html#/Add_layer_to_map/01190000000n000000/ You have to check if the map is actually loaded, before you can do anything with its layers etc..
... View more
08-13-2012
06:14 AM
|
0
|
0
|
594
|
POST
|
Do you check in the onstatuschangedlistener or in your method with mapview.isloaded() if if the map is loaded?
... View more
08-13-2012
01:57 AM
|
0
|
0
|
594
|
POST
|
Maybe a Query/QueryTask to just get the Features in the current extent? I don't really know the exact functinality of the query functionality, but this is the first thing that pops into my mind without doing some research. Not sure if this works at all. Just an idea...
... View more
08-07-2012
12:11 PM
|
0
|
0
|
144
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|