|
POST
|
You're close, try something like this: HashMap<String, Object> hashMap = new HashMap<String, Object>();
hashMap.put("Title", title);
hashMap.put("BodyText", bodyText);
graphicsLayer.addGraphic(new Graphic(point, symbol, hashMap, null)); -Andy
... View more
06-05-2012
02:46 PM
|
0
|
0
|
2514
|
|
POST
|
Amelie, just reiterating that I haven't worked much with Fragments, however I have seen similar errors to the last two lines you posted: 06-05 13:25:40.282: I/GLMapCore(10355): TexturesManager::releaseGraphicsHardwareResources 06-05 13:25:40.282: E/libEGL(10355): call to OpenGL ES API with no current context (logged once per thread) The only thing I can think of is make sure the AndroidManifest is configured properly. There may be a property that is needed. Hopefully someone else who has used Fragments can jump in. http://developer.android.com/guide/topics/manifest/activity-element.html -Andy
... View more
06-05-2012
09:47 AM
|
0
|
0
|
2835
|
|
POST
|
Olli, what happens if you just use the default accuracy circle settings? Does the circle look okay then? To do that comment out the following line: //locationService.setAccuracyCircleOn(false); In regards to the SimpleMarkerSymbol, does it work for you if you try a different style? I was able to duplicate that STYLE.X didn't work for me either. SimpleMarkerSymbol s = new SimpleMarkerSymbol(Color.BLUE,15,com.esri.core.symbol.SimpleMarkerSymbol.STYLE.CIRCLE); -Andy
... View more
06-05-2012
09:24 AM
|
0
|
0
|
1310
|
|
POST
|
li, please provide more details on your use case and what you are trying to accomplish, for example are you working on routing on road networks? There are plans to include routing samples in the next upcoming release, but here are currently no supported samples. -Andy
... View more
06-05-2012
09:06 AM
|
0
|
0
|
503
|
|
POST
|
Amelie, I haven't used Fragments much, but...logcat should give you some hints on what and where the problem is. I suggest posting the crash or FATAL error portion from logcat. -Andy
... View more
06-05-2012
08:58 AM
|
0
|
0
|
2835
|
|
POST
|
Brian, you can use the updateGraphic() method to move a graphic. Currently there is no move() method that lets you specify a distance since the updateGraphic() method is projection agnostic. Here's a link: http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/com/esri/android/map/GraphicsLayer.html#updateGraphic(int, com.esri.core.geometry.Geometry) If you want to see how to create a point that's a certain distance away from a starting point, I have some JavaScript and Flex code that shows how to do that on the client. I haven't converted it to Java yet. If interested email me: agup at esri dot com. The Nearby Sample shows how to use an OnSingleTapListener and then iterate through the graphics until you find the one with the correct ID: http://help.arcgis.com/en/arcgismobile/10.0/apis/android/help/index.html#//01190000002s000000 Here's the pattern: int[] graphicIDs = graphicsLayer.getGraphicIDs(x, y, 25);
if (graphicIDs != null && graphicIDs.length > 0) {
//Graphic gr = graphics[0];
Graphic gr = graphicsLayer.getGraphic(graphicIDs[0]);
updateContent((String) gr.getAttributeValue("Rating"),
(String) gr.getAttributeValue("Title"));
Point location = (Point) gr.getGeometry();
callout.setOffset(0, -15);
callout.show(location, content);
}
... View more
06-05-2012
08:54 AM
|
0
|
0
|
2514
|
|
POST
|
The Nearby sample contains an example of how to build a custom callout with rating stars: http://help.arcgis.com/en/arcgismobile/10.0/apis/android/help/0119/01190000002s000000.htm In general, the pattern is to use getCallout() like this: // display the result in map callout
String msg = "Address:"
+ result.getAddressFields().get("Address")
+ "\n" + "City:"
+ result.getAddressFields().get("City") + "\n"
+ " State:"
+ result.getAddressFields().get("State") + "\n"
+ " Zip:"
+ result.getAddressFields().get("Zip");
map.getCallout().show(locationPoint, message(msg)); -Andy
... View more
06-05-2012
07:28 AM
|
0
|
0
|
695
|
|
POST
|
Aleksi, I'm not able to duplicate...I have an app that rotates on pinch and the setOnTouchListener override works just fine on several phones. Do you have an OnPinchListener set in addition to a setOnTouchListener? -Andy
... View more
06-05-2012
07:15 AM
|
0
|
0
|
916
|
|
POST
|
I think that error has something to do with emulator not working right. One possibility is to verify that your android:minSdkVersion is set correctly in the AndroidManifest.xml file, as compared to the Android OS version you are using: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html. Also, make sure to "clean" your project. And, here's a good blog post for using ArcGIS Runtime SDK for Android v1.1.x with an emulator: http://blogs.esri.com/esri/arcgis/2012/05/02/arcgis-runtime-sdk-for-android-v1-1-supports-android-emulator/ In regards to connecting your phone to your development machine, yes, that's typically the best way to get started. You will most likely need to install device drivers for your phone: http://developer.android.com/sdk/win-usb.html -Andy
... View more
06-04-2012
07:11 AM
|
0
|
0
|
1403
|
|
POST
|
Aleksi, Did you see any errors in logcat right after you did a double tap? I believe the following code snippet will prevent double tap from propagating: map.setOnTouchListener(new MapOnTouchListener(getApplicationContext(), map){
@Override
public boolean onDoubleTap(MotionEvent point) {
Log.d("Test","onDoubleTap do nothing");
return false;
}
});
-Andy
... View more
05-31-2012
10:21 AM
|
0
|
0
|
916
|
|
POST
|
For reference: this problem has been logged under NIM081315. -Andy
... View more
05-31-2012
09:13 AM
|
0
|
0
|
3100
|
|
POST
|
For those who this bug applies to it has been logged under NIM081315. -Andy
... View more
05-31-2012
09:12 AM
|
0
|
0
|
2852
|
|
POST
|
Shafri, do you have Logcat installed? It will show any errors thrown by the emulator (or phone). Since the title bar of the app didn't even load I would expect some sort of an error to show up in Logcat. Also make sure you have v1.1.1 of our SDK. -Andy
... View more
05-29-2012
07:00 AM
|
0
|
0
|
1403
|
|
POST
|
Another thought is that your drawing cache may be defaulting to a width/height of 0,0. According to the Android docs you may be missing a call to createBitmap(). And, that method calls for a width, height and Bitmap.Config. Here's a code snippet that will hopefully re-point you down the right track: View map = findViewById(R.id.map);
bitmap = Bitmap.createBitmap(map.getWidth(), map.getHeight(), Bitmap.Config.RGB_565); If you already tried this, can you list out what patterns you've tried? -Andy
... View more
05-25-2012
07:41 AM
|
0
|
0
|
2852
|
|
POST
|
Jeff, here's Douglas Crockford's comment on why he removed comments from JSON: https://plus.google.com/118095276221607585885/posts/RK8qyGVaGSr -Andy
... View more
05-24-2012
03:12 PM
|
0
|
0
|
5975
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month 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 |
Thursday
|