|
POST
|
Hi Mike C, I read a little more into what you are doing and also tried reproducing this way without success: public class MapEventsBrian extends MapOnTouchListener {
MapView mMapView;
Context mContext;
TextView myText;
Point mapPoint;
public MapEventsBrian(Context context, MapView view) {
super(context, view);
mContext = context;
this.mMapView = view;
myText = new TextView(context);
myText.setText("TEST");
}
@Override public void onLongPress(MotionEvent point) {
super.onLongPress(point);
float v = point.getX();
float v1 = point.getY();
Log.e("NOHE", "TEST");
Log.e("NOHE", "" + v + " " + v1);
mMapView.getCallout().setContent(myText);
mapPoint = mMapView.toMapPoint(v,v1);
mMapView.getCallout().show(mapPoint);
}
@Override public boolean onLongPressUp(MotionEvent point) {
mMapView.getCallout().hide();
return true;
}
} and this was my implementation: public class MainActivity extends AppCompatActivity {
MapView mapView;
TextView myText;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.map);
MapEventsBrian mapB = new MapEventsBrian(getApplicationContext(), mapView);
mapView.setOnTouchListener(mapB);
}
}
... View more
07-07-2016
07:56 AM
|
0
|
2
|
2354
|
|
POST
|
I believe that from this blog by Shawn Kendrot (I assume their geonet id is: Shawn Kendrot), and in the blog he explains that the scale is the same as real world inches to inches and is based off of the device reporting the screen DPI. A copy of that blog can be found here: Visually Located | Working with the MapView control in the ArcGIS Runtime
... View more
07-07-2016
07:04 AM
|
1
|
0
|
1171
|
|
POST
|
Hello Vish Apte, Although I have yet to test this, I do have a hunch that this may be available in the Quartz API. If you look under the ArcGISMap Object in Quartz, there is a method called AddStatusChangedListener on the map object. This object is independent of the MapView, so I believe this would be better used to actually monitor the map loading status itself. Here is the documentation for that method: ArcGISMap| arcgis-android Maybe later today, I can explore this option and let you know the results. DISCLAIMER: The Quartz API is in Beta and is subject to change. This may not be a suitable for production.
... View more
07-07-2016
06:57 AM
|
0
|
0
|
1637
|
|
POST
|
Hello Mike C, I am trying to reproduce this issue and I am having trouble. This is the code I am using to display the callout: @Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myText = new TextView(getApplicationContext());
myText.setText("TEST");
mapView = (MapView) findViewById(R.id.map);
mapView.setOnLongPressListener(new OnLongPressListener() {
@Override public boolean onLongPress(float v, float v1) {
Log.e("NOHE", "TEST");
Log.e("NOHE", "" + v + " " + v1);
mapView.getCallout().setContent(myText);
Point mapPoint = mapView.toMapPoint(v,v1);
mapView.getCallout().show(mapPoint);
return false;
}
});
} Are you doing something similar or different? Thanks, Alexander
... View more
07-07-2016
06:51 AM
|
0
|
0
|
2354
|
|
POST
|
That is interesting. What version of Android are the phone and touchpad running?
... View more
07-07-2016
06:45 AM
|
0
|
0
|
2064
|
|
POST
|
dgtery dgt, Did the above suggestions help? Are you still having issues?
... View more
07-06-2016
07:28 AM
|
0
|
0
|
1557
|
|
POST
|
In your MainActivity.java, it looks as though you are setting the client id twice. Once on line 8 and then again on line 11. Do you get any output when it crashes in LogCat? Try removing line 8 entirely and just set the client id on line 11. Additionally, would you try changing your target api version to that of 22 in your app build.gradle file? This would avoid any gotchas with runtime permissions and possibly any errors that may exist with the newer Android versions. One more interesting point: If you uninstall the existing app on the emulator and redeploy to that emulator, does the issue persist?
... View more
07-06-2016
07:08 AM
|
0
|
2
|
2064
|
|
POST
|
To follow up, we discussed this offline and it looked as though it was a caching issue in the code / on the device and that is what prevented the geodatabase file from opening.
... View more
07-06-2016
06:35 AM
|
0
|
0
|
996
|
|
POST
|
Would you please mark my answer as correct if it helped you?
... View more
07-05-2016
05:16 AM
|
0
|
0
|
2091
|
|
POST
|
Generally, for our Android SDK, you would want to connect to get feature layers through ArcServer, not PostGRES or Microsoft SQL Server via a database connection. You may want to view this StackOverflow post as it explains different ways to make a direct connection. (Pure Android) Can i use PostgreSQL or mySQL in android App development - Stack Overflow If I have misunderstood your question, please let me know.
... View more
07-05-2016
05:13 AM
|
0
|
2
|
1327
|
|
POST
|
Hey joh Tren, I think this question would be better directed to either customer service or your local distributor. Then you can discuss with them in detail in a phone conversation what exactly your app does and ensure there will not be any "gotchas" with the licensing. Hope this helps!
... View more
07-01-2016
07:12 AM
|
0
|
0
|
1329
|
|
POST
|
Using the topo basemap I was able to get this to work via the following Activity: package com.arcgis.androidsupportcases.ogcwmts;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.esri.android.map.MapView;
import com.esri.android.map.event.OnStatusChangedListener;
import com.esri.android.map.ogc.WMTSLayer;
import com.esri.core.geometry.SpatialReference;
import com.esri.core.ogc.wmts.WMTSLayerInfo;
import com.esri.core.ogc.wmts.WMTSServiceInfo;
public class MainActivity extends AppCompatActivity {
MapView mapView;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.map);
mapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if (status == STATUS.INITIALIZED) {
AsyncTask.execute(new Runnable() {
@Override public void run() {
WMTSServiceInfo serviceInfo = null;
try {
serviceInfo =
WMTSServiceInfo.fetch("http://server.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/1.0.0/WMTSCapabilities.xml");
WMTSLayerInfo layerInfo = serviceInfo.getLayerInfos().get(0);
final WMTSLayer layer = new WMTSLayer(layerInfo, SpatialReference.create(3857));
layer.layerInitialise();
layer.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if(status == STATUS.INITIALIZED) {
mapView.addLayer(layer);
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
});
}
}
... View more
06-30-2016
08:23 AM
|
1
|
3
|
3647
|
|
POST
|
Have you already taken a look at the following documentation: WMTSLayer | ArcGIS Android 10.2.8 API Additionally, this is the syntax from that documentation on how to initialize that type of layer: WMTSServiceInfo serviceInfo = WMTSServiceInfo.fetch("http://[SERVER:PORT]/[INSTANCE]/services/[SERVICE]/MapServer/WMTS/1.0.0/WMTSCapabilities.xml");
WMTSLayerInfo layerInfo = serviceInfo.getLayerInfos().get(0);
WMTSLayer layer = new WMTSLayer(layerInfo, SpatialReference.create(3857));
layer.layerInitialise(); Are you able to share the WMTS file that you are experiencing trouble with?
... View more
06-30-2016
05:31 AM
|
0
|
5
|
3647
|
|
POST
|
I have gone ahead and tested this on Android 6.0.1 on an LG Nexus 5x and was not able to reproduce the results that you are seeing. Below is the code that I used in my sample. public class MainActivity extends AppCompatActivity {
MapView mapView;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LicenseResult licR = ArcGISRuntime.setClientId(getString(R.string.ArcGISClientId));
Log.e("NOHE",licR.toString());
setContentView(R.layout.activity_main);
Toast.makeText(getApplicationContext(), "points added to MapView First", Toast.LENGTH_LONG).show();
}
}
... View more
06-29-2016
08:30 AM
|
1
|
0
|
4387
|
| 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
|