POST
|
We have a lot of shapfiles which we want to display in the Android device. And we know the SDK support rendering for .shp file, however we need to render with different symbol according to some property of the feature. We have found this(https://developers.arcgis.com/android/latest/guide/symbols-and-renderers.htm) which support what we want. However there are almost 200+ dinstinct value of a property which means we have to define 200+ symbols in the codes manually. And we have created the .mxd file in desktop, so we wonder if we can use that directly in moble? Or any other solution to reduce the hard code job?
... View more
01-12-2017
08:00 PM
|
0
|
0
|
1055
|
POST
|
In fact I am using the listener at the moment, and it does not work as expectd. 1) I can not see the map unless I zoom in the map. 2) The map will disappear once the map scale is smaller than a certain value.
... View more
07-25-2015
05:05 PM
|
0
|
0
|
542
|
POST
|
I am trying add raster layer like tiff to the map, and I use the following code: FileRasterSource rasterSource = new FileRasterSource(file);
final RasterLayer rasterLayer = new RasterLayer(rasterSource);
mMapView.addLayer(rasterLayer); It works, however once I want to set the layer to fill the veiewport of the map: mMapView.setExtent(rasterLayer.getExtent()); It does not work. And what's more, I found that the map can not be zoom out at a certain scale. I am not sure why.
... View more
07-22-2015
06:42 AM
|
0
|
2
|
3353
|
POST
|
I tried to add some local shapefile data to the map, and I use the ShapefileFeatureTable, however it does not work, core codes: mMap = (MapView) root.findViewById(R.id.mapView); try {
ShapefileFeatureTable sft = new ShapefileFeatureTable(path);
Renderer renderer = RendererHelper.getRender(sft.getTableName(), sft.getGeometryType());
FeatureLayer featureLayer = new FeatureLayer(sft);
featureLayer.setRenderer(renderer);
mMap.addLayer(featureLayer);
} catch (Exception e) {
Toast.makeText(getActivity(), "Error:" + e.getMessage(), Toast.LENGTH_LONG).show();
} public class RendererHelper {
public static Renderer getRender(String tableName, Geometry.Type type) {
List<Symbol> list = new ArrayList<>();
switch (type) {
case POINT:
case MULTIPOINT:
SimpleMarkerSymbol sms = new SimpleMarkerSymbol(Color.RED, 20, SimpleMarkerSymbol.STYLE.CIRCLE);
list.add(sms);
break;
case LINE:
case POLYLINE:
SimpleLineSymbol sls = new SimpleLineSymbol(Color.RED, 5, SimpleLineSymbol.STYLE.DOT);
list.add(sls);
break;
case POLYGON:
SimpleFillSymbol ps = new SimpleFillSymbol(Color.RED, SimpleFillSymbol.STYLE.SOLID);
SimpleLineSymbol pl = new SimpleLineSymbol(Color.RED, 1, SimpleLineSymbol.STYLE.DOT);
list.add(ps);
list.add(pl);
break;
}
return new SimpleRenderer(new SimpleFillSymbol(Color.RED, SimpleFillSymbol.STYLE.SOLID));
}
} Now I meet two problems: 1 The shapfile is not visible in the map 2 As shown the simpleRenderer does not support the compositesymbol(it will show the json erro) What's going on?
... View more
07-03-2015
02:02 AM
|
0
|
2
|
3609
|
POST
|
Hi: I am using Arcgis SDE 10 to export our geographic data to the Oracle 11g database, and the spatial column are saved using the `St_Geometry` type. And we have almost 10 + tables with points, lines, and polygons. However we have to query the data despite of their geometry type, so I create a view which union all the required table and columns to the view, like this: create or replace view MyView as
select objectid,shape,name,address, 'FeaturePY' as table_name from FeaturePY
union all
select objectid,shape,name,address, 'FeatureLN' as table_name from FeatureLN
union all
select objectid,shape,name,address, 'FeaturePY' as table_name from FeaturePY
........ Everything works well unless I try to query the data by some spatial , for example, I want to query data inside the bounding box of (20.22774247419824,30.168182996158205,20.29657868635644 30.21127000177344) and make a pagination, I use the following two sqls: 1) for data select * from ( select name,st_astext(shape) as shape from MyView h where ST_Intersects(h.shape, st_geometry('POLYGON ((20.22774247419824 30.168182996158205, 20.29657868635644 30.168182996158205, 20.29657868635644 30.21127000177344, 20.22774247419824 30.21127000177344, 20.22774247419824 30.168182996158205))',3)) = 1 ) where rownum <= 10 2) for total count: select count(shape) from MyView h where ST_Intersects(h.shape, st_geometry('POLYGON ((20.22774247419824 30.168182996158205, 20.29657868635644 30.168182996158205, 20.29657868635644 30.21127000177344, 20.22774247419824 30.21127000177344, 20.22774247419824 30.168182996158205))',3)) = 1 However I found that the first sql will cost almost 30 seconds to get the data, and the second sql will take almost 6 minutes to get the count which is unacceptable. And I have tried to use a different spatial function `ST_ENVINTERSECTS` to replace the `ST_Intersects`, but I can not get any improvement. This is my current environment: Dbserver: Windows server 2008 x64
Arcgis SDE 10 x64 with service pack5 installed.
Oracle 11gR2 x64
Records in the view: almost 150,000 I am not sure what's the problem, any suggestion to fix this?
... View more
03-22-2015
11:09 PM
|
1
|
0
|
3856
|
Title | Kudos | Posted |
---|---|---|
1 | 03-22-2015 11:09 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|