|
POST
|
Hi Mohamed EzzerI, Did the previous example help resolve your issue? If so, would you please mark it as correct? Thanks.
... View more
07-28-2016
01:49 PM
|
0
|
0
|
1681
|
|
POST
|
I have noticed that your onResume does not account for any existing layers in the map. Therefore, you were adding a layer over top of your baselayer. I went and added a small check and this seemed to resolve the issue: @Override
public void onResume() {
super.onResume();
Log.d("SwitchBasemap", "onResume");
ArcGISTiledMapServiceLayer baseMap = new ArcGISTiledMapServiceLayer(getString(R.string.basemapURL1));
map = (MapView) findViewById(R.id.map);
map.unpause();
map.setAllowRotationByPinch(true);
map.setMaxExtent(new Envelope(1102008.94, 6711653.74, 1110493.45, 6723119.29));
map.setMinScale(35000);
if (map.getLayers().length > 0) {
map.removeLayer(0);
map.addLayer(baseMap, 0);
}
else {
map.addLayer(baseMap, 0);
}
} Please let me know if this helps.
... View more
07-28-2016
01:48 PM
|
1
|
0
|
2853
|
|
POST
|
Can you upload the smallest reproducible test case that you have? I may gain better insight if I can see what exactly you are doing. Thank you!
... View more
07-28-2016
09:42 AM
|
0
|
4
|
4592
|
|
POST
|
I am in the process of downloading the file as we speak. I will update you as available. I am in training the next two days so it may be a little difficult to find the time to test this.
... View more
07-28-2016
09:41 AM
|
1
|
0
|
2853
|
|
POST
|
mMapView.setOnSingleTapListener(new OnSingleTapListener() {
@Override public void onSingleTap(float v, float v1) {
Point p = mMapView.toMapPoint(v,v1);
Point newPoint =
(Point) GeometryEngine.project(p, mMapView.getSpatialReference(), SpatialReference.create(4326));
Log.e("NewPointCoords", "" + newPoint.getX() + " " + newPoint.getY());
}
});
This would give you the coordinates in spatial reference 4326
... View more
07-28-2016
09:37 AM
|
1
|
1
|
1681
|
|
POST
|
Awesome! If this resolved your question, would you kindly mark my answer as the correct one? Thank you!
... View more
07-28-2016
05:15 AM
|
0
|
0
|
1535
|
|
POST
|
Lageplan Göttingen That seems odd. Can you send me the smallest reproducible sample so I may test here in house and update you with the results I see?
... View more
07-28-2016
05:14 AM
|
1
|
3
|
2853
|
|
POST
|
Jiang Zhu I am going to branch this into a new discussion as this question differs a little bit more than your original.
... View more
07-28-2016
05:12 AM
|
0
|
0
|
1037
|
|
POST
|
Hello Mohamed EzzerI, How are you creating the markers? This should give us some insight in to how best to assist you in querying for their values.
... View more
07-28-2016
05:11 AM
|
0
|
6
|
4592
|
|
POST
|
You would query against whatever geometry is showing the marker. This is generally a feature service layer or graphics layer. Do you know what is supporting the underlying geometry of the marker symbol?
... View more
07-27-2016
10:26 AM
|
0
|
8
|
4592
|
|
POST
|
You won't be able to use identify on TPK's or tiled services as these just show pictures, they do not carry any attribute information with them. You would need to use a feature service to identify features. Additionally, you would need a .geodatabase file with the feature service stored in there to identify the features offline. This is not possible without this downloaded.
... View more
07-27-2016
09:04 AM
|
2
|
0
|
1166
|
|
POST
|
I do not have access to that team either and would not be able to reach out to them.
... View more
07-27-2016
08:54 AM
|
0
|
0
|
1016
|
|
POST
|
I do not believe that retainState is the issue here as according to the documentation, it: MapView | ArcGIS Android 10.2.8 API "Saves the coordinates of the center of the map, the current map resolution, and the LocationDisplayManager state" This should not affect the layers that are showing. Is there a chance that an app with a higher priority that needs memory is recycling your app and you are going back to the onCreate method or is it possible that your app is hitting onRestart and then onStart since the activity may no longer be visible? Here is a copy of the activity lifecycle again for reference:
... View more
07-27-2016
08:53 AM
|
0
|
5
|
2853
|
|
POST
|
Daniel Gailer I got this working by listening for the status changed to have completed doing the following in my MainActivity.java: package com.arcgis.androidsupportcases.geonetcenterandzoom;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.esri.android.map.MapOptions;
import com.esri.android.map.MapView;
import com.esri.android.map.event.OnStatusChangedListener;
public class MainActivity extends AppCompatActivity {
MapView mMapView = null;
private MapOptions mMapOptionsSat = new MapOptions(MapOptions.MapType.SATELLITE, 43.971873, 6.161288, 9);
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initUI();
}
private void initUI(){
mMapView = (MapView) findViewById(R.id.esriMapView);
mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if(status == STATUS.INITIALIZED) {
mMapView.enableWrapAround(true);
mMapView.setAllowRotationByPinch(true);
mMapView.setMapOptions(mMapOptionsSat); //This here doesn't work
}
}
});
}
} What did your onStatusChanged listener look like?
... View more
07-27-2016
08:24 AM
|
1
|
2
|
1535
|
|
POST
|
I do not believe that there is a listener for this class (MarkerSymbol | ArcGIS Android 10.2.8 API ). Instead, I would implement an OnSingleTapListener on the map object and check if there are any markers there using a query. If there are, then handle the OnSingleTap as you wish. ( SingleTapListener ) Is there something special you wanted to do with selecting marker symbols when clicking on the MapView?
... View more
07-26-2016
07:56 AM
|
1
|
12
|
4592
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-15-2014 03:16 PM | |
| 1 | 01-06-2015 03:33 PM | |
| 1 | 12-02-2014 10:47 AM | |
| 1 | 07-15-2014 03:31 PM | |
| 1 | 09-23-2014 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|