POST
|
Hi, What are you trying to achieve? The geometry object (Point, Polygon, etc.) classes and the GeometryEngine class allow you to work with latitude and longitude coordinates, or geometries in other units, as geometry objects aren't bound to a particular spatial reference - it depends what the spatial reference of the map/layer they are being added to is. For example GeometryEngine has a project method which takes a longitude, latitude, and output spatial reference, returning a point in the units of the output spatial reference, for dealing with geometries which have been defined using latitude longitude coordinates. ~elise
... View more
11-08-2013
04:06 AM
|
0
|
0
|
223
|
POST
|
Thanks for all of these options. Although I can't do exactly what I want to do, I at least have a few work arounds. I would like to reccomend that the API have a setAlpha(int alpha) method added for a SympleMarkerSymbol. SimpleLineSymbol has it, why not SimpleMarkerSymbol? Suggestion noted! You can however set transparency on an individual SimpleMarkerSymbol via its Color, e.g. by using a color like (0, 0, 0, 150) where 150 is the alpha. You can also set an opacity on the GraphicsLayer containing these symbols, so for example if you wanted a group of symbols to have a certain transparency you could stick them all in the same layer and set the opacity on the layer via setOpacity(float).
... View more
10-29-2013
04:06 AM
|
0
|
0
|
1325
|
POST
|
You can use a SimpleFillSymbol with a SimpleLineSymbol border and a transparent fill color - however you need to use this type of symbol with a polygon Geometry, not a point. So, you could either create your circles as polygons or use GeometryEngine.buffer to buffer a point and thus create a polygon geometry, then symbolize that with a fill symbol. If you don't want the scale dependent behavior that a polygon will give you, then the PictureMarkerSymbol suggestion is probably your best bet.
... View more
10-24-2013
07:04 AM
|
0
|
0
|
1325
|
POST
|
Hi, You won't be able to do Identify or Labeling using the 'dynamic workspaces' functionality (i.e. ad hoc adding of data rather than through a map package / mpk) at 10.1.1, but the REST API does support query on dynamic layers. The Java SE Runtime API doesn't have support within the Query classes for this, but look for this at 10.2. For now to query a dynamic-workspace-style layer, e.g. a shapefile, you would need to construct your own query request, an example is on this page: http://resources.arcgis.com/en/help/rest/apiref/ms_dyn_query.html e.g. Example 1, where 'layer={...}' could be obtained in code from the DynamicLayerInfo of the layer you want to query. If you'd like more information let me know, ~elise
... View more
06-14-2013
08:29 AM
|
0
|
0
|
275
|
POST
|
Hi, I tried with the example provided, there are some some inputs:: in the provided functionality- you have to click mouse 4 times. in order to complete the rectangle to zoom in/out. but this I would like to do like this:: When user clicks on Map using Left Mouse button and then drag the mouse (Keeping the Mouse button pressed; and while dragging it should draw the rectangle also.), and when use releases the mouse, it should draw the rectangle and zoom in/out. This also save the end user's time. and its very user friendly also. The sample 'Switch Overlays' that Mark mentioned has exactly the functionality you describe above. When you click the 'Zoom Box Overlay' button, the overlay gets activated. Now you can press the mouse to get the initial corner of the zoom box, then drag and see the rectangle being drawn, and when you release the mouse it zooms to this rectangle/envelope. The source code for this is in the toolkit, the class is called ZoomBoxOverlay (com.esri.client.toolkit.overlays). You can get to the source code via your IDE by adding the toolkit jar to a project and expanding the classes as appropriate, or the toolkit sources jar is in <install location>/sdk/jars called ArcGIS_Runtime_Java_Toolkit-sources which you can unzip and browse through. ~elise
... View more
06-04-2013
02:56 AM
|
0
|
0
|
487
|
POST
|
Hi Carlos, Apologies for not being more specific. We didn't quite get this right at 1.0 so I assumed the post was about the dynamic workspaces in general. Just to confirm that yes this workflow works with a file geodatabase and the other workspace factory types (see the static WorkspaceInfo creation methods and also WorkspaceFactoryType enum). The change in code in this case would be one line: workspaceInfo = WorkspaceInfo.CreateFileGeoDatabaseConnection("WORKSPACE", "c:/data/ArcObjectsData/portland/portland.gdb"); (where I have the portland.gdb file gdb at the location in the code, and "WORKSPACE" is an arbitrary String since when I create the TableDataSource I retrieve this name programatically). Plus you also need to make sure that the data source name is correct/exists in the gdb. In my case for example: tableDataSource.setDataSourceName("Zones"); cheers, ~elise
... View more
05-24-2013
06:35 AM
|
0
|
0
|
749
|
POST
|
Hi, Yes this works at 10.1.1. The samples showing a simple dynamic workspace functionality workflow are in the sample app under 'Datasources' called 'Add Raster' and 'Add Shapefile'. Note I've also just given Jan's code above a spin, i.e. modifying the Dynamic Layers 'Simple Renderer' sample, and that workflow works nicely as well. By switching one of the mpk layers to point to a local shp file instead, the 'render' button displayed/udpated my local shapefile's renderer, in my case instead of the 'states' layer. (Note that I used WorkspaceInfo.CreateShapefileFolderConnection("WORKSPACE", "c:/data/shapefile") to create the workspaceInfo in my test code, and I put my actual shp file name in tableDataSource.setDataSourceName("MyShapefile").) ~elise
... View more
05-20-2013
02:52 AM
|
0
|
0
|
749
|
POST
|
Also note that in the same Locator class we have methods for batch geocoding, e.g. in our Javadoc here: http://resources.arcgis.com/en/help/runtime-java/apiref/com/esri/core/tasks/ags/geocode/Locator.html#batchAddressToLocationAsync(java.util.List, com.esri.core.map.CallbackListener) Ultimately those take similar input as the (one at a time) geocoding methods in Locator, so you still have to read in/prepare your data in the same way. ~elise
... View more
04-24-2013
08:16 AM
|
0
|
0
|
269
|
POST
|
That was what the first part of my post was about. When I use USCitiesStates.mpk for example from the sample data that comes with the SDK, I can add 3 shapefiles as it has 3 sublayers. If I use the mpk_blank, I can add one at a time. Note that the code I attached has a couple of build errors against 10.1.1 jars, from imports that have changed packages. A simple remove/re-import solves that but just to mention it. ~elise
... View more
04-24-2013
01:27 AM
|
0
|
0
|
662
|
POST
|
Hi, For multiple shapefiles to one local map service, you need to have them in the same directory and then when you create your dynamic map service layer, for each sub layer you can update the dynamic layer infos to point to your shapefile datasource. The limitation here is in your available sublayers. With 3 sublayers you can add 3 shapefiles in one go, etc. So I'm definitly interested in your second idea : - could you provide a sample code for this ? (multiple shp to a single instance of "local map service" ?) - but will I still be able to manage layer order the same way ? (user can change layer order at any time in my app) -> if exemple I have 1 TPK, 1 GraphicsLayer and 2 Shapefiles added to same MPK instance, could I manage order like 0-TPK 1-SHP n°1 2-GraphicsLayer 3-SHP n°2 ? The shapefiles at this point are like sublayers of an ArcGISDynamicMapServiceLayer, so they would move as a group and not separately. I'll attach a modified version of the add shapefile sample that has the multiple file selection enabled on the JFileChooser and corresponding modifications to loop through each file selected. ~elise
... View more
04-23-2013
09:28 AM
|
0
|
0
|
662
|
POST
|
I should add to this that we're interested in gauging the level of interest in JavaFX and that it would be good to hear from those using this technology or wanting to use it and the sorts of applications being worked on or planned! ~elise
... View more
04-18-2013
01:48 AM
|
0
|
0
|
510
|
POST
|
Is it possible to implement a customized PanTo which has the same nice and smooth behavior than built-in ? Hi, By built-in you mean the map panning that happens when you pan with the mouse? This is different from 'PanTo', like the panTo method we expose in the API to pan to a geometry. I need to ask if you like the 'nice and smooth' mouse panning that comes with the JMap why you are trying to re-write it yourself? The navigator overlay responds to mouse clicks on the navigator's pan buttons and uses the public method 'panTo(Geometry)' I mention above. It's meant for this type of pan from a current extent to a new extent based on the geometry passed in, rather than the fairly continuous panning that happens when you navigate with the mouse. So the short answer is that the methods used internally for each type of panning are different and the internal logic for mouse panning is not exposed via the API so you probably can't re-write it yourself, no. ~elise
... View more
04-18-2013
01:42 AM
|
0
|
0
|
538
|
POST
|
Hi, With what's available from JavaFX today you can embed a JavaFX component into a Swing application using a JFXPanel. The JFXPanel is a Swing component that can hold JavaFX content, as described here: http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm As far as I can tell the reverse is not possible right now, i.e. embedding a Swing component into a JavaFX application, but it may become available in the future. So, since the JMap is a Swing component, it can co-exist with one or more JFXPanels / JavaFX UI elements in this way. ~elise
... View more
04-15-2013
09:40 AM
|
0
|
0
|
510
|
POST
|
Hi, The API doesn't have something specific for this case at the moment but we hope to better support this workflow at the upcoming release. At the moment, you can get the geometry type of the layer by creating a request yourself as described on this page: http://resources.arcgis.com/en/help/rest/apiref/dynamicLayer.html From the sample code snippet you quote, you can rearrange the order a bit and use the LayerDataSource to create your request parameters... DynamicLayerInfoCollection layerInfos = localDynamicLayer.getDynamicLayerInfos(); DynamicLayerInfo layerInfo = layerInfos.get(0); // Create the data source TableDataSource dataSource = new TableDataSource(); dataSource.setWorkspaceId(workspaceId); dataSource.setDataSourceName(fileName); // Set the data source LayerDataSource layerDataSource = new LayerDataSource(); layerDataSource.setDataSource(dataSource); layerInfo.setLayerSource(layerDataSource); // NEW STUFF HERE LayerInfo li = new LayerInfo(0, layerDataSource); String layerParam = null; String geometryType = null; try { layerParam = li.toJson(); // make an http request, e.g. this code adapted from http://www.vogella.com/articles/ApacheHttpClient/article.html HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(localMapService.getUrlMapService() + "/dynamicLayer?"); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(new BasicNameValuePair("layer", layerParam)); post.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = client.execute(post); BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); String line = ""; while ((line = rd.readLine()) != null) { // can get the geometry type from the response line, for example... String regexp = "esriGeometry(\\w+)"; Pattern pattern = Pattern.compile(regexp); Matcher matcher = pattern.matcher(line); matcher.find(); geometryType = matcher.group().replaceAll(regexp, "$1"); System.out.println(geometryType); } } catch (Exception e) { e.printStackTrace(); } // END NEW STUFF // create renderer based on geometry, etc. DrawingInfo drawingInfo = new DrawingInfo(myRenderer, myTransparency); layerInfo.setDrawingInfo(drawingInfo); localDynamicLayer.refresh(); The regexp stuff in particular is proof of concept... better to properly parse the Json that gets returned... Hope that helps, ~elise
... View more
04-11-2013
08:55 AM
|
0
|
0
|
333
|
POST
|
Rob's post is from 2011; at the time we were releasing a Beta version of the ArcGIS Runtime SDK for Java. Sorry for any confusion, ~elise
... View more
04-05-2013
08:05 AM
|
0
|
0
|
298
|
Title | Kudos | Posted |
---|---|---|
1 | 09-18-2014 10:18 AM | |
1 | 07-09-2014 03:54 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|