|
POST
|
You can do this, and additionally you can write code to display attribution in a different location (following Esri guidelines for attribution) if that works better for your app. But before you do, you should work out if it's a legal licensing requirement to leave that in place, depending on your app and the data you show in your maps. I would suggest reading these help topics: License your app—ArcGIS Runtime SDK for Android | ArcGIS for Developers - "Esri requires that when you use an ArcGIS Online basemap, Esri data services, or Esri API technology in your app you must also include Esri attribution." Esri attribution | ArcGIS for Developers (linked from above topic) - Note that there's no sample for this in Android yet as far as I know but it will be something we'll be working on for a website update. And the API ref call you use is on GeoView| arcgis-android . Hope this helps, Shelly
... View more
01-13-2017
04:40 AM
|
2
|
1
|
1955
|
|
POST
|
Hi Shees, I'm afraid this didn't make it into the 100.0 release of the SDK. We know this is important and it's definitely something we want to add. However, I cant give you a definite date for when this will be available as it's not been addressed yet. I'll add this question to the internal issue, and will come back and update this when I'm able to give more information. Sorry couldn't be more help, Shelly
... View more
01-10-2017
02:13 AM
|
1
|
1
|
2178
|
|
POST
|
Hi Sean, There's a difference in the input parameters of MapView.centerAt vs GeometryEngine.project. The project method takes in an x-coordinate and a y-coordinate as parameters; however, centerAt takes in latitude and longitude. Also, note that latitude relates to the y-coordinate (north-south axis), and longitude relates to x-coordinate (east-west axis). This would explain why your centerAt works as you expect but your project does not - you might have a graphic being drawn, but just not where you expect to see it, due to this order of parameters. When you pass in lat/long values, make sure you pass in the parameters the correct way around - e.g. Point gps_mercator = GeometryEngine.project(longitude, latitude, webSR); Hope this helps, Shelly
... View more
12-13-2016
04:31 AM
|
1
|
1
|
1131
|
|
POST
|
Good point Eric, it's easy to get caught by this. Also, if you're working on Android Marshmallow or up, then these permissions will not automatically be granted at install time - so add code to check, then ask for permission when you run the app, and allow the user to agree or disagree - you can see an example of this in this sample on GitHub: arcgis-runtime-samples-android/MainActivity.java at master · Esri/arcgis-runtime-samples-android · GitHub .
... View more
12-06-2016
02:19 AM
|
1
|
0
|
1108
|
|
POST
|
I'm afraid there's no equivalent method available on a GraphicsLayer in the Android runtime SDK, so I'd suggest if your code is in control of adding the graphics that change the extent then you should probably get your map extent once you know your additions/changes are complete. For generally monitoring the extent changes of a map (e.g. when a user pans or zooms, or when the visible extent is programmatically changed), it is not very simple to monitor this in the current 10.2.8 release. However in the upcoming new release this is made much easier as we've added different listeners for this. For example I you could add a listener that is called whenever navigation is completed (e.g. a user stops panning) - see GeoView| arcgis-android GeoView.addNavigationCompletedListener(NavigationCompletedListener). So if this is a workflow you want, I'd suggest it's definItely worth figuring out if you will be using 10.2.8, or the new release, as that will be out very soon. Regards Shelly
... View more
11-16-2016
02:49 AM
|
1
|
1
|
828
|
|
POST
|
If the map doesn't have any layers or spatial reference, it won't initialize, so you'd need something to trigger that status changed listener.
... View more
10-28-2016
05:36 AM
|
1
|
1
|
618
|
|
POST
|
> It's just a MapView with usual id, width, height, mapOptions set to Street and zoom set to 15. No basemap URL You dont need an internet connection to initialize a MapView. However, if you have used the mapOptions attribute, then the map view will be initialized using one of the Esri default basemap map services - so would require an internet connection. I would remove the mapOptions attribute (you can leave the MapView definition there). Then in your code, check if you have an internet connection - if so, you can programmatically add one of the services (Folder: / ) to your map as the base layer, which will initialize the map. If you dont have a connection, then you can go ahead and programmatically add your local data layers. Hope this helps, Shelly
... View more
10-28-2016
02:48 AM
|
1
|
4
|
2966
|
|
POST
|
Hi Thomas, In your code, looks like you have the X and Y the wrong way around, assuming that the Point you're creating is supposed to be in a geographical coordinate system - e.g. the coordinates are latitude and longitude, like from GPS position. The X-axis of the coordinate system is the longitude - for WGS 84 coordinate system, this would be a value from -180 to +180, and the first parameter in point constructor is the x value. The y-axis is latitude, -90 to +90, and the second parameter in the constructor. I cant tell from your code what coordinate system your map is in - it will be the same coordinate system as that first layer that you add. So as long as that is geographic coordinate system as well, that will work - you need to zoom to a point that is in the same coordinate system as the map. Hope this helps, Shelly
... View more
09-02-2016
03:37 AM
|
1
|
1
|
899
|
|
POST
|
08-15 11:18:08.781 8719-8719/com.neseapl.test W/System.err: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.neseapl.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.neseapl.test-1/lib/arm64, /data/app/com.neseapl.test-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libruntimecore_java.so" Not quite sure how to fix this issue, seems to be not able to find the native libraries. Yes, I agree that this is most likely what's happening. I can see in the path above that arm64 paths are involved, and also there was a comment above that things work OK, until another dependency is added. Given those two points, it's very possible you're running in to the problem where once Android has loaded a 64-bit native library, it no longer loads 32-bit libraries. StackOverflow contains this question and answer which might help explain things: How to use 32-bit native libaries on 64-bit Android device - Stack Overflow . This blog post might also be useful: https://corbt.com/posts/2015/09/18/mixing-32-and-64bit-dependencies-in-android.html . The ArcGIS Runtime SDK provides 32-bit armeabi-v7a library, which would normally be loaded when running on 64 bit, as its forwardly compatible, which would explain why you're finding things OK until you add more dependencies.
... View more
08-16-2016
02:55 AM
|
1
|
0
|
3330
|
|
POST
|
Alexanders reply above looks correct to me, but thought I would also add that we've improved the API for exactly this type of workflow in the current Beta version, so in future you'll be able to use identify methods to identify a tapped feature on any of the layers - Identify features—ArcGIS Runtime SDK for Android (Quartz Beta) | ArcGIS for Developers .
... View more
07-26-2016
01:12 AM
|
1
|
0
|
1293
|
|
POST
|
Hi Tero, I had a look at your WMTS endpoint and it looks like it only supports KVP mode, not REST. The default mode for the WMTSLayer in the Esri Android SDK is REST mode, so I think the requests being sent to the service are asking for the layer in REST mode. You can explicitly set the mode if you use WMTSLayerInfo: WMTSServiceInfo wmtsServiceInfo = WMTSServiceInfo.fetch("https://julkinen.liikennevirasto.fi/rasteripalvelu/wmts", null, WMTSServiceMode.KVP); (As you found, fetch does not switch to a background thread to do network requests like the layer constructors do, so do this on a background thread yourself). You can iterate all the WMTSLayerInfo items in the service this way. Theres no constructor on WMTSLayer that allows you to set the KVP mode, and the layer starts to initialize by default, so you can't change the mode after that. However, there is a constructor where you can say not to immediately initialize the layer, as below - then set the mode to KVP, and then initialize the layer and add it to the mapView after that: WMTSLayer layer = new WMTSLayer("https://julkinen.liikennevirasto.fi/rasteripalvelu/wmts", null, false); layer.setServiceMode(WMTSServiceMode.KVP); layer.layerInitialise(); Using this code I could see the WMTSLayer in the MapView. I added this to a blank map, as I think perhaps that service doesnt support web mercator (from a quick browse of the capabilities), so I'm assuming here you're adding this to a map where the basemap SpatialReference matches those supported by the WMTS service. Hope this helps, Shelly
... View more
07-05-2016
07:03 AM
|
2
|
0
|
2633
|
|
POST
|
Hi David, Yes, the current release of ArcGIS Runtime SDK for Android (10.2.8) supports multiple MapViews in one app, or within the same layout if you want. I think this has been true for a number of releases, but I couldn't say for sure myself exactly what release this changed at. Regards, Shelly
... View more
06-03-2016
02:00 AM
|
0
|
3
|
1583
|
|
POST
|
Looks like you're probably getting the toMapPoint arguments from a map touch listener, but what are the typical Point X,Y coordinates you're ending up with? I wonder if you have a wrap-around map, and you're tapping in a location after having panned over to a repeat of the map? If so, I just tested, and I see this error. So if you're dealing with this situation, then you can call GeometryEngine.normalizeCentralMeridian, to correct the map coordinates back to within the domain of the SpatialReference, and then use that returned Geometry to pass to the CoordinateConversion method. Let me know if this helps or not. Regards, Shelly
... View more
05-17-2016
03:27 AM
|
0
|
0
|
737
|
|
POST
|
Hi Deepak, I could see anything that looked wrong with your code - I put this into an app, and found the '50' text symbol displays at San Francisco as expected. The ConvertMyLocationPoint function returned a Point like this: mapPoint.getX() - -1.3632191466053985E7 mapPoint.getY() - 4544626.829865076 How is your MapView defined? That's where the coordinate system is being taken from, so I wonder if that is the problem in your case. Here is the MapView definition I was using - as I'm using the Esri basemaps, the spatial reference is Web Mercator Auxiliary Sphere (id = 102100). <com.esri.android.map.MapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" mapoptions.MapType="Streets" mapoptions.ZoomLevel="1" /> What is the Spatial Reference that you're projecting the point to? Does the returned Point definately have 0,0 as coordinates? Regards Shelly
... View more
05-17-2016
02:55 AM
|
0
|
0
|
599
|
|
POST
|
Thanks Caleb! Yes, that's the correct URL. I have fixed my link above as well, to avoid others getting the same problem!
... View more
04-20-2016
02:05 AM
|
2
|
0
|
584
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-03-2024 10:08 AM | |
| 1 | 01-02-2024 08:09 AM | |
| 1 | 11-07-2023 01:44 AM | |
| 1 | 08-03-2018 03:54 AM | |
| 1 | 03-07-2017 02:12 AM |