POST
|
final Geodatabase geodatabase = new Geodatabase(geoDatabaseFilePath);
geodatabase.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
for (GeodatabaseFeatureTable geoDbTable : geodatabase.getGeodatabaseFeatureTables()){
//How to finish here ??
}
}
});
geodatabase.loadAsync();
... View more
07-18-2017
07:21 AM
|
0
|
0
|
737
|
POST
|
I do not understand how to get all the tables, and then pick up the required values
... View more
07-18-2017
06:48 AM
|
0
|
1
|
737
|
POST
|
Any ideas ? I think I have to use queryFeaturesAsync. At he moment I have this code : final Geodatabase geodatabase = new Geodatabase(geodatabaseFilePath);
geodatabase.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
FeatureTable featureTable = geodatabase.getGeodatabaseFeatureTable("TABLE_NAME");
featureTable.getFields();
}
});
geodatabase.loadAsync();
... View more
07-18-2017
03:56 AM
|
0
|
6
|
737
|
POST
|
Hello community, I have a question about the geodatabase. So I have a .geodatabase file containing from 33 tables, each table has different columns and field values. I'm creating an Android app and want to get the right values from the selected table. How can I achieve it ?
... View more
07-18-2017
03:30 AM
|
0
|
7
|
1008
|
POST
|
Hi, maybe someone knows how to identify spatial reference of mobilemapPackage? I`m using Android studio. How can I check this in console ? Thanks for help!
... View more
06-19-2017
05:50 AM
|
0
|
2
|
588
|
POST
|
Hi everyone, I have MapPackage. And how to lay on that on my tiled layer? MapPackage should be like graphicOverlay on tiledLayer. At the moment i have this code for MapPackage. I imagine that is not very difficult to do.. Any ideas ? Waiting for help and suggestions. Thanks !!
... View more
06-14-2017
05:43 AM
|
0
|
3
|
1103
|
POST
|
Hi, thanks for reply, yeah, but this version for Android Runtime 10.2.9 version. I need for 100.0.0 (QUARTZ). I can`t find any sample... Could you help me with that ? I would be very grateful
... View more
06-13-2017
04:28 AM
|
0
|
1
|
524
|
POST
|
So I have to work with this part of code ? mWebSocketClient = new WebSocketClient(uri) {
@Override
public void onOpen(ServerHandshake serverHandshake) {
Log.i("Websocket", "Opened");
mWebSocketClient.send("Hello from " + Build.MANUFACTURER + " " + Build.MODEL);
}
@Override
public void onMessage(String s) {
final String message = s;
InputStream ins = getResources().openRawResource(
getResources().getIdentifier("griffithparkjson",
"raw", getPackageName()));
InputStreamReader inputReader = new InputStreamReader(ins);
BufferedReader bufferReader = new BufferedReader(inputReader);
String line;
StringBuilder text = new StringBuilder();
// read the text file
try {
while (( line = bufferReader.readLine()) != null) {
text.append(line);
}
} catch (IOException e) {
Log.d(TAG, e.toString());
}
String JsonString = text.toString();
// create Geometry from JSON
Geometry geometry = Geometry.fromJson(JsonString, spatialReference);
GraphicsOverlay overlay = new GraphicsOverlay();
// add graphics overlay on map view
mMapView.getGraphicsOverlays().add(overlay);
SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.DIAGONAL_CROSS, Color.GREEN, null);
// add graphic of Griffith Park
overlay.getGraphics().add(new Graphic(geometry, fillSymbol));
// set viewpoint of map view to Geometry - Griffith Park
mMapView.setViewpointGeometryAsync(geometry);
runOnUiThread(new Runnable() {
@Override
public void run() {
TextView textView = (TextView)findViewById(R.id.messages);
textView.setText(textView.getText() + "\n" + message);
}
});
}
@Override
public void onClose(int i, String s, boolean b) {
Log.i("Websocket", "Closed " + s);
}
@Override
public void onError(Exception e) {
Log.i("Websocket", "Error " + e.getMessage());
}
};
mWebSocketClient.connect();
}
... View more
06-08-2017
11:20 PM
|
0
|
1
|
373
|
POST
|
Hi, so I`m working with GeoEvent task. And I stuck with point simulation. How to specify that, InputStream ins takes geometry points from uri, not from file which is local in device. I have this code now: import android.graphics.Color;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URISyntaxException;
import com.esri.arcgisruntime.geometry.Geometry;
import com.esri.arcgisruntime.geometry.SpatialReference;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.view.Graphic;
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
import com.esri.arcgisruntime.mapping.view.MapView;
import com.esri.arcgisruntime.symbology.SimpleFillSymbol;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "ChangeViewPoint";
private WebSocketClient mWebSocketClient;
private MapView mMapView;
private SpatialReference spatialReference;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
connectWebSocket();
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.commit();
}
// inflate MapView from layout
mMapView = (MapView) findViewById(R.id.mapView);
// create a map with the BasemapType topographic
ArcGISMap map = new ArcGISMap(Basemap.Type.OCEANS, 56.075844, -2.681572, 11);
// set the map to be displayed in this view
mMapView.setMap(map);
spatialReference = SpatialReference.create(4326);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
switch (item.getItemId()) {
case R.id.action_settings:
return true;
}
return super.onOptionsItemSelected(item);
}
private void connectWebSocket() {
URI uri;
try {
uri = new URI("wss:/*******/StreamServer");
} catch (URISyntaxException e) {
e.printStackTrace();
return;
}
mWebSocketClient = new WebSocketClient(uri) {
@Override
public void onOpen(ServerHandshake serverHandshake) {
Log.i("Websocket", "Opened");
mWebSocketClient.send("Hello from " + Build.MANUFACTURER + " " + Build.MODEL);
}
@Override
public void onMessage(String s) {
final String message = s;
InputStream ins = getResources().openRawResource(
getResources().getIdentifier("griffithparkjson",
"raw", getPackageName()));
InputStreamReader inputReader = new InputStreamReader(ins);
BufferedReader bufferReader = new BufferedReader(inputReader);
String line;
StringBuilder text = new StringBuilder();
// read the text file
try {
while (( line = bufferReader.readLine()) != null) {
text.append(line);
}
} catch (IOException e) {
Log.d(TAG, e.toString());
}
String JsonString = text.toString();
// create Geometry from JSON
Geometry geometry = Geometry.fromJson(JsonString, spatialReference);
GraphicsOverlay overlay = new GraphicsOverlay();
// add graphics overlay on map view
mMapView.getGraphicsOverlays().add(overlay);
SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.DIAGONAL_CROSS, Color.GREEN, null);
// add graphic of Griffith Park
overlay.getGraphics().add(new Graphic(geometry, fillSymbol));
// set viewpoint of map view to Geometry - Griffith Park
mMapView.setViewpointGeometryAsync(geometry);
runOnUiThread(new Runnable() {
@Override
public void run() {
TextView textView = (TextView)findViewById(R.id.messages);
textView.setText(textView.getText() + "\n" + message);
}
});
}
@Override
public void onClose(int i, String s, boolean b) {
Log.i("Websocket", "Closed " + s);
}
@Override
public void onError(Exception e) {
Log.i("Websocket", "Error " + e.getMessage());
}
};
mWebSocketClient.connect();
}
public void sendMessage(View view) {
EditText editText = (EditText)findViewById(R.id.message);
mWebSocketClient.send(editText.getText().toString());
editText.setText("");
}
@Override
protected void onPause(){
super.onPause();
mMapView.pause();
}
@Override
protected void onResume(){
super.onResume();
mMapView.resume();
}
}
Please, help to solve it. It would be very helpful.
... View more
06-08-2017
06:09 AM
|
0
|
3
|
1036
|
POST
|
At the moment I have Android Lollipop version. Can it be a problem ?
... View more
06-05-2017
07:26 AM
|
0
|
1
|
689
|
POST
|
Thanks for reply ANohe-esristaff, but that not helps me.
... View more
06-05-2017
06:17 AM
|
0
|
2
|
689
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|