|
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
|
1427
|
|
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
|
3011
|
|
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
|
3202
|
|
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
|
3202
|
|
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
|
672
|
|
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
|
2600
|
|
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
|
4901
|
|
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
|
690
|
|
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
|
2482
|
|
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
|
2482
|
|
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
|
2482
|
|
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
|
5926
|
|
POST
|
@roessera here are some guidelines to help verify what's going on when a proxy doesn't seem to be working: - Make sure you have the latest version of the ArcGIS proxy. - Make sure that the Server URL properties are configured properly. - If you are using tokens, follow the directions for the appropriate proxy (.jsp, ashx or php) for allowing tokens. - Check the Proxy's web server log files. You may have to turn on full logging first. And, don't forget to disable full logging after you are done testing. If the proxy can't connect to ArcGIS Server you should be able to see an error in the web server log. - As a last resort, run an HTTP protocol analyzer on the proxy server, for example WireShark. This will let you see and analyze the inbound and outbound HTTP connections. -Andy
... View more
05-04-2012
07:36 AM
|
0
|
0
|
4901
|
|
POST
|
In addition to what has been posted above, this is an FYI with background info for others looking to implement pinch gestures with the Android browser and JavaScript. At this time, support for multi-touch is not consistent on the Android browser across various phones and Android OS versions. It is, however, available on many of the latest phones using Android v3+. Note that jQuery and Sencha, just to mention a few, face the similar problems in supporting this. So, for now, Dojo mobile best practices are to disable scaling in the browser via the viewport metatag. You can test that pinch sitll works on a particular phone by simply removing the meta tag and re-testing your app: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/> Also, if you haven't already seen it here's a "find nearby" example of implementing Dojo mobile with the ArcGIS API for Javascript. Addt'l References: http://code.google.com/p/android/issues/detail?id=11909 http://www.sitepen.com/blog/2011/12/07/touching-and-gesturing-on-iphone-android-and-more/ -Andy
... View more
05-03-2012
02:44 PM
|
0
|
0
|
2600
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 03-26-2026 03:12 PM | |
| 2 | 02-21-2026 10:23 AM | |
| 2 | 08-01-2025 06:20 AM | |
| 1 | 05-27-2025 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|