POST
|
Old thread I know - but there is now an easy way in case anyone searching... arcpy.Extent has a polygon property that neatly returns the extent as a polygon ex = extent.polygon
... View more
11-21-2018
06:43 AM
|
1
|
0
|
640
|
POST
|
Just to add I've had good success with the DJI Phantom 3 and DJI Phantom 4. It geotags the images which means its one step less to do than the drones with the GoPro cameras. Their latest entry drone though (dji mavic pro), just starting to ship, might need more research before buying - the fov(field of view) of the camera is a good bit narrower and the focus less automatic and so might be a less suited to mapping.
... View more
10-05-2016
08:30 AM
|
1
|
2
|
1043
|
POST
|
I wish to do some batch upload of attachments... (attachments are uploaded when the user has a good network coverage) So as is typically done I created a background thread so as not to block the UI. But I find that the Esri Android SDK Upload Attachments function uses callbacks - which makes uploading more than 1 attachment difficult - Is there any easy way to block the background processing thread at the point ({1}) until ArcGISFeatureLayer::addAttachment() returns with a result- to make my function ESRI_SDKAttachmentAddLive work like calling the org.apache.commons.httpclient post functions directly would? Thanks all. @Override protected Message /*AsyncTask::*/doInBackground(String... params)
{
....
private void ESRI_SDKAttachmentAddLive(String sURLBase, AttachInfo attachInfo, String sFeatureObjectID)
{ //this is now in a non-ui thread.
//issue - No blocks here -so will continue to run....not ideal for batch upload of images
try
{
final ArcGISFeatureLayer fl = new ArcGISFeatureLayer(sURLBase, MODE.SNAPSHOT);
File file = new File(attachInfo.mFilename);
//Note: fl.addAttachment will strip off the path for us
fl.addAttachment(Integer.valueOf(sFeatureObjectID), file, "image/jpeg", new CallbackListener<FeatureEditResult>()
{
@Override public void onCallback(FeatureEditResult arg0)
{ //FeatureEditResult [objectId=2801, globalId=null, success=true, error=null]
Log.d(Utils.tag,"Image Uploaded OK");
{2}
}
@Override public void onError(Throwable arg0)
{
Log.e(Utils.tag,"Error: "+arg0.getMessage());
{3}
}
} );
}
catch(Exception ex)
{
ex.printStackTrace();
Log.e(Utils.tag,ex.getMessage());
}
//{1}want to block at this point - until we have a callback (good or bad) from the fl.addAttachment call
}
... View more
05-31-2013
07:53 AM
|
0
|
0
|
2228
|
POST
|
Implementing a typical identify - and doing the following- on a ArcGISFeatureLayer with 50 or so polygons - the GetGraphicsID() frequently brings back more polygons than expected - polygons that are not connected and not near the point selected: Notes: * The polygons brought back have different objectids * There are other polygons between and nearer that are not brought back as the result (see the selected items in the screenshot) * it doesn't happen with all polygons - * once you find two polygons like this - it is reproducible - clicking on either one will select the other even if they are at opposite ends of the map. Create Layer code and add polygons section of code Options options = new Options(); options.mode = MODE.SNAPSHOT; FeatureSet fs = new FeatureSet(); fLayer = new ArcGISFeatureLayer(CachedData.sRestLayerDef, fs, options); Graphic[] graphics=(Graphic[])(msg.obj); {//all graphics are created and added one at a time Polygon geom = Utils.GetPolygonFromJson(...); Graphic graphic = new Graphic(geom, fill, attributes, null);; graphics.add(graphic); } fLayer.addGraphics(graphics); @Override public boolean onSingleTap(final MotionEvent e) { ... int[] ids = featureLayer.getGraphicIDs((float)e.getX(), (float)e.getY(), 15); featureLayer.setSelectedGraphics(ids, true); } [ATTACH=CONFIG]24614[/ATTACH] Thanks... Ambrose.
... View more
05-23-2013
06:23 AM
|
0
|
0
|
1336
|
POST
|
Hi, Thanks so much for all the hard work on the Android SDK - it has allowed us to show the customer quite quickly an app that they would now like further developed- I have a few questions since upgrading to the new version ...and I have been asked to post this here... The popup is a control that takes the information from rest and constructs a dialog that the user can edit attributes - the developer writes the code behind that stores the results etc.. Previously in the last version the popup could do the following: 1. Show the Rest Attribute values 2. Go into Edit mode where the attributes can be edited. 3. Display a Toolbar that showed Edit mode, Delete a feature, Move a point, Add attachment 4. Functionality to select a photo from the photo gallery 5. Display all attachments in an image carousel 6. Worked fine with offline data In this version - all the above except #1 and #2 seems to be missing.... Specifically the following issues. Issue #1: Removed toolbar Basically all the buttons from the PopupView don�??t seem to be available anymore�?� �?� The Add attachment button �?� and gallery viewer at the bottom �?� the take photo button at the bottom �?? �?� the little recycle button, move graphic button, accept button etc�?� They are replaced in the sample code with some very simple looking buttons. I have been told that some of this might be possible to fix with skinning - and pointers as to what we would need to do, to get back close to the previous version we had would be appreciated - Issue #2: Documentation The documentation suggests we can get the old toolbar back �?? but I cannot see how. (link) "You can replace default toolbar of the popup viewby setting the PopupToolbar property on PopupContainer." But there does not appear to be any property of that name and the toolbar seems to be completly removed. Issue #3: Change to isEditable() causing problem With the previous version - it was possible to add and edit an ArcGISFeatureLayer that was created from features passed in as JSON. ie. a disconnected feature set that has no server connection (as in the offline sample provided with the SDK). We wrote the extra software to sync this with the server when the server was within 3G or Wifi range. Now there seems to be a change in ArcGISFeatureLayer function �??public boolean Featurelayer::isEditable()�?� In the current version only - "isEditable always returns False when used with ArcGisFeatureLayer"�?� this possibly breaks the using ArcGisFeatureLayer for offline usage with this dialog and maybe other. This is not how it worked in the previous version. Now �?? if the ArcGISFeatureLayer is created from an inmemory FeatureSet / JSON rather than a url �?? the resultant featurelayer isstuck as �??ReadOnly�?� as this function returning False always. In the previous version (December version) �?? Creating a FeatureLayer from an in memory FeatureSet left the data writable (and just some functions were blocked like ApplyEdits as expected) Can we have ArcGisFeatureLayer not readonly again? Issue #4: Change to hasAttachments causing problem "public boolean Featurelayer::hasAttachments() also has the same issue as in #3 It used to perfectly possible for Popups to be displayed in the editor when ArcGisFeatureLayer was used as the source. (They could not be stored automatically in the Feature class - but the Popup allowed them to be selected - and then we stored the attachements separately and synced them back to server when the time came. In the current version only - "HasAttachments always returns False when used with ArcGisFeatureLayer"�?� this breaks the possibility of using ArcGisFeatureLayer for offline usage with this dialog. We really need this so that attachments will once again show in the Popup and we can do offline edits. Issue #5: Small Graphic Glitch There is a new graphic border around the Text edit controls - and on our device (Galaxy Note 2) the graphics are not in the correct place. They are too short for the textbox and appear at the bottom in edit mode. In Read mode they sometimes clip the bottom of the text making it hard to read - I'll attach screen shots of this - see the Red Circled graphic glitches in the screenshot below. Issue #6: Extra Support Libraries We are using the latest software on a very new device - a Galaxy Note 2 �?? and it took a few hours to realise that you had to load extra Android libraries (http://developer.android.com/tools/extras/support-library.html) onto the device to make the popup work �?? eventually found it through the forum - (thanks 🙂 ). 6a. The extra libraries was not necessary with the previous version of the Esri Android SDK 6b. all other parts of the Android SDK work fine without these extra libs �?? just the New version of the popup seems to need them �?? 6c. this seems to increases the apk installation file a fair bit - so possibly slowing down debugging? 6d. The docs the forums point to seem to suggest only old Androids need these extra dlls - but this is a fairly recent device. Can we build a certain way to not have to ship this legacy support library? My manifest is currently set to <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" /> Issue #7: Null pointer exception This bit of code crashes the device immediately�?? worked fine in old version. Note: The file is present and the app has full access to it via manifest file. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"></uses-permission> Code: Uri uri = Uri.parse("file:/storage/sdcard0/Pictures/Screenshots/IMG_edited/2013-01-16-20-25-31.png"); try{ Options options = new Options(); options.mode = MODE.SNAPSHOT; //Snapshot is REQUIRED for inmemory or the identify doesnt work ArcGISFeatureLayer fLayer = new ArcGISFeatureLayerAC(sDataLayerDef, fs, options); //ie - and an...offline.. featurelayer. I also tried waiting for map to initialise Popup popup = featureLayer.createPopup(map, 0, graphic); //crashes here (it seems caused by "popup.f.h.c being NULL") popup.addAttachment(uri); } catch(Exception ex){ Alert("Error:"+ex.getMessage()); } 01-25 11:49:38.360: E/AndroidRuntime(22074): FATAL EXCEPTION: main 01-25 11:49:38.360: E/AndroidRuntime(22074): java.lang.NullPointerException 01-25 11:49:38.360: E/AndroidRuntime(22074): at com.esri.android.map.popup.ArcGISAttachmentsAdapter.a(Unknown Source) 01-25 11:49:38.360: E/AndroidRuntime(22074): at com.esri.android.map.popup.ArcGISAttachmentsAdapter.a(Unknown Source) 01-25 11:49:38.360: E/AndroidRuntime(22074): at com.esri.android.map.popup.ArcGISAttachmentsView.addAttachment(Unknown Source) 01-25 11:49:38.360: E/AndroidRuntime(22074): at com.esri.android.map.popup.Popup.addAttachment(Unknown Source) 01-25 11:49:38.360: E/AndroidRuntime(22074): at ie.esriireland.npwsfieldcap.NPWSFieldcap$RunQueryFeatureLayerTask.onPostExecute(NPWSFieldcap.java:1424) 01-25 11:49:38.360: E/AndroidRuntime(22074): at ie.esriireland.npwsfieldcap.NPWSFieldcap$RunQueryFeatureLayerTask.onPostExecute(NPWSFieldcap.java:1) Issue #8: javaDoc I think this broke when I upgraded to 10.1.1 (via the Help - Install Updates updater) - all the context Help is missing �?? I think it used to give some more Information and links to the docs when you hovered over functions �?? but it doesn�??t seem to do this anymore�?� It just says �??javadoc could not be found�?� (screenshot attached below) - probably something I have misconfigured.. I can see the Javadoc is in the Eclipse folder ok - just not connected correctly. Issue #9: Using previous SDK versions I notice there is the possibility of using other SDKs - eg. older versions of Android SDK - but when I upgraded the ArcGis software it deleted completely the old version of the Esri Android SDK - it would have been nice to be able to compare the old and new - is it possible to have both installed and choose which SDK to use at compile time? Issue #10: Specific Device Issues By default on the Galaxy Note - the Popup background is white - but the Dropdown (domain) lists in the popup are all a very dark grey background and very dark black ink in colour �?? you can just barely make out the text - changing the theme of the application helped - but just pointing out the default is not possible to read. Attachments: No Javadoc [ATTACH=CONFIG]21151[/ATTACH] Old Popup Before 10.1.1 (the attachment button is not shown sorry - its at the bottom of page) [ATTACH=CONFIG]21152[/ATTACH] New Popup After (No toolbar - small graphic issue circled in red and no attachment button or image gallery shown) [ATTACH=CONFIG]21153[/ATTACH] Thanks again 🙂
... View more
01-29-2013
01:58 AM
|
0
|
2
|
3821
|
Title | Kudos | Posted |
---|---|---|
1 | 11-21-2018 06:43 AM | |
1 | 10-05-2016 08:30 AM |
Online Status |
Offline
|
Date Last Visited |
01-03-2024
12:48 PM
|