|
POST
|
Did you see any errors in the project or Logcat? Usually if an app doesn't load in the emulator there are either errors in the project, or errors that occurred during loading. -Andy
... View more
05-17-2012
08:58 AM
|
0
|
0
|
1659
|
|
POST
|
Ah, right, because we don't currently support ZoomControls directly in com.esri.android.map.MapView. You set up a stand-alone ZoomControl and that's why the listener is returning your zoomButton as the scope. Got it. So, I was able to reproduce the behavior. While it's not exactly clear what's causing the problem, I suspect it's related to the View.OnClickListener and we'd have to dig deeper. As a temporary workaround, by simply setting up an OnZoomListener I was able to modify the behavior of the callout. When I implemented this pattern the callout seems to always hide() when using the ZoomControl, which isn't 100% ideal . Maybe you can work with something related to this for now, and give it a try? In the meantime, I'll submit an enhancement request that we look into working side-by-side with ZoomControls. map.setOnZoomListener(new OnZoomListener() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void preAction(float pivotX, float pivotY, double factor) {
// TODO Auto-generated method stub
}
@Override
public void postAction(float pivotX, float pivotY, double factor) {
Log.d("test","test of the OnZoomListener");
}
});
... View more
05-16-2012
10:28 AM
|
0
|
0
|
1616
|
|
POST
|
Check the properties of the view object that's being passed by the View.OnClickListener. It's possible that listener is passing in a copy of the View which contains a different State. public void onClick(View v){
mMapView.zoomin();
}
versus public void onClick(View v){
v.zoomin();
} -Andy
... View more
05-15-2012
11:59 AM
|
0
|
0
|
1616
|
|
POST
|
Simon, I'm not familiar with this one, but I'm looking into whether it was a bug or not. -Andy
... View more
05-14-2012
08:56 AM
|
0
|
0
|
3637
|
|
POST
|
Mark, thanks for bringing that up as I was thinking the same thing right after I posted it. Yes, if you use Handler, rather than AsyncTask, you have to use the MessageQueue to send and handle messages relative to the main thread. For the benefit of others that read this and may be wondering when to use AsyncTask and when to use Handler: I suggest that AsyncTask is perfect for simple jobs such as a straight forward REST request/response. And, that you should consider using Handler for jobs that require an additional level of control, or advanced execution and processing. This was just a prototype sample, but I believe we do need to tweak it so that it shows how to loop information back into the UI thread and complete the cycle. If others have any experience with either of these please feel free to share what you have learned. -Andy
... View more
05-14-2012
07:28 AM
|
0
|
0
|
3577
|
|
POST
|
In addition to Mark's code snippet, here's some additional code taken from a Clip and Ship demo that shows another pattern for coding against an asynchronous GP service. The full sample code will be included with the v3 release of our SDK later this year. Or, if you want to see the full app sooner then ping me: agup at esri dot com. strmv.setParamName("Layers_to_Clip");
strmv.setValues(arrayList);
final ArrayList<GPParameter> paramlist = new ArrayList<GPParameter>();
paramlist.add(strmv);
paramlist.add(areaofinterest);
paramlist.add(featureformat);
handler = new Handler();
submitJobandPolling(gp, paramlist); /**
* Method submitJobandPolling.
* @param gp Geoprocessor
* @param params List<GPParameter>
*/
void submitJobandPolling(final Geoprocessor gp,
List<GPParameter> params) {
try {
GPJobResource gpjr1 = gp.submitJob(params);
JobStatus jobstatus = gpjr1.getJobStatus();
final String jobid = gpjr1.getJobID();
Log.d("Test", "jobid " + jobid);
Log.d("Test", "jobstatus " + jobstatus);
// if (!jobstatus.equals("esriJobSucceeded")) {
if (jobstatus != JobStatus.succeeded) {
handler.postDelayed(new Runnable() {
@Override
public void run() {
try {
GPJobResource gpjr2 = gp.checkJobStatus(jobid);
GPMessage[] messages = gpjr2.getMessages();
if ( messages!= null && messages.length > 0) {
for (int i = 0; i < messages.length; i++) {
Log.d("Test", "Message: " + messages.getDescription());
}
}
Log.d("Test", "Polling thread is: "
+ Thread.currentThread().getName());
JobStatus status = gpjr2.getJobStatus();
boolean jobcomplete = false;
if (status == JobStatus.canceled
|| status == JobStatus.deleted
|| status == JobStatus.failed || status == JobStatus.succeeded
|| status == JobStatus.timedOut) {
jobcomplete = true;
}
if (jobcomplete) {
if (status == JobStatus.succeeded) {
GPDataFile outputZipfile = (GPDataFile) gp
.getResultData(jobid, "Output_Zip_File");
Log.d("Test", "zip file is "
+ outputZipfile.getUrl().toURI()
.toString());
}else {
Log.d("Test", "GP failed");
}
} else {
handler.postDelayed(this, 5000);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, 4000);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
... View more
05-11-2012
03:20 PM
|
0
|
0
|
3577
|
|
POST
|
@Simra, thanks, we're checking into it. I saw the same thing this morning. -Andy
... View more
05-11-2012
07:27 AM
|
0
|
0
|
855
|
|
POST
|
Hi Yohan, sweet! Any chance you have the app running somewhere that's publicly accessible, even if it's still a bit rough? I could give it a spin on a couple different devices. -Andy
... View more
05-10-2012
03:14 PM
|
0
|
0
|
2957
|
|
POST
|
Hi Kyle, There are three likely scenarios. 1) Configuring an ArcGIS Proxy and making sure it's working. This will allow your applications to access GIS services such as http://services.arcgisonline.com. My previous suggestions relate to this scenario. 2) Configuring your organization's network dmz/proxy/firewall. For this you'll have to talk to your organization's network/IT engineers. They will have to configure your network proxy, DMZ or firewall that allows connections between the ArcGIS Proxy and http://services.arcgisonline.com. 3) Configuring proxy access to your ArcGIS Server. You also mentioned you have ArcGIS Server. If you have external applications that need to access your ArcGIS Server GIS services, then you'll also have to work with your network/IT engineers. We consider this an enterprise-level, third party deployment and offer professional services to help architect and configure reverse proxy configurations. Here's a few links that can help with this scenario. Configure a reverse proxy system architecture with ArcGIS Server Configure a reverse proxy system architecture for ArcGIS Server with IIS 7 I hope that helps, -Andy
... View more
05-09-2012
07:10 AM
|
0
|
1
|
5595
|
|
POST
|
@simra, thanks for the heads up. I was able to duplicate that on the ArcGIS app. I'm passing it on to tech support for further analysis and to write up a CR. I'm running Android v2.3.6 on an Moto Atrix. [Update: this has been logged as NIM080657 if you want to track it] -Andy
... View more
05-08-2012
07:50 AM
|
0
|
0
|
773
|
|
POST
|
@Simra, gotcha thanks. We are going ahead and creating a CR on this issue. I don't have the number yet. Just a side note for when it does get fixed, you should be able to turn the method to true without setting the OnStatusChangedListener. -Andy
... View more
05-08-2012
06:38 AM
|
0
|
0
|
2906
|
|
POST
|
@Simra, in general I'd recommend running your apps in Eclipse debug mode. That way you get access to the Eclipse debugger and DDMS/Logcat at the same time. Also, please make the following changes to your code that are in red text below. That will enable the error to show up in Logcat. Can you give this a try and let me know if anything shows up? Note: I'm getting a nullpointer exception when I run your code, which would explain why the logo isn't showing up. We are also looking into on our end. @Override
public void onStatusChanged(Object source, STATUS status) {
if (OnStatusChangedListener.STATUS.INITIALIZED == status && source == map) {
Log.d("Test", "resolution:" + map.getResolution());
try{
map.setEsriLogoVisible(true);
}
catch(Exception e)
{
Log.d("Test","OnStatusChangedListener: " + e.getMessage());
System.out.println("OnStatusChangedListener: " + e.getMessage());
}
}
if(OnStatusChangedListener.STATUS.INITIALIZATION_FAILED == status){
//Best Practice to handle initialization failures
Log.d("Test","failed: " + status.toString());
}
}
}); -Andy
... View more
05-07-2012
10:02 AM
|
0
|
0
|
2906
|
|
POST
|
@simra, yep, these problems are related to the application life cycle and that the map hasn't been fully initialized yet. Certain processes load or run slower on a phone in comparison to a browser, so it's best to simply make sure the map has loaded before doing any actions against it by setting up an OnStatusChangedListener. Here are some details on the OnStatusChangedListener: http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/com/esri/android/map/event/OnStatusChangedListener.html I'm not sure why the logo wouldn't show up. Did the app throw any other errors? -Andy
... View more
05-04-2012
08:40 AM
|
0
|
0
|
2906
|
|
POST
|
@petaques, Hi, I'm not a JSON expert so I can't answer most of your questions. However, you can find detailed information on our JSON response syntax. For that information, please consult the ArcGIS Server REST API specifcation: http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/index.html Also, here's a few other links that I've found to be helpful: http://json.org/ http://www.json.org/js.html -Andy
... View more
05-04-2012
08:00 AM
|
0
|
0
|
6362
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 3 weeks ago | |
| 1 | 04-10-2026 08:29 AM | |
| 1 | 03-26-2026 03:12 PM | |
| 2 | 02-21-2026 10:23 AM | |
| 2 | 08-01-2025 06:20 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|