|
POST
|
Have you looked at this sample: Add shapefile | ArcGIS API for JavaScript You can download the source as a zip file and extend it to meet your needs.
... View more
03-04-2015
06:43 PM
|
2
|
1
|
1995
|
|
POST
|
Quick observation - there is a missing semi-colon when you assign the store to the grid: //identifier present in the store.
grid.store = store // < missing semi-colon
... View more
03-04-2015
03:23 PM
|
0
|
1
|
2054
|
|
POST
|
There are no methods in the API to do this but you could write your own. The first thing I would do is to make sure that your graphics layer gets an Id with it is created. Check out the options parameter when creating the GraphicsLayer. Then when you want to apply a definition query: Get your graphics layer object Loop through all of the graphics Test your definition query against a property in the attributes Set the visibility of each graphic (based on your test condition) Redraw the graphics layer Something like this: var gl = map.getLayer('shapefileGL'); // < this needs to be your graphics layer id
var value = dom.byId('defValue').value; // this is the value to filter on
var field = "STRAHLER"; // this is the field (attribute) to filter on
setSimpleDefinitionQuery(gl, field, value);
function setSimpleDefinitionQuery(gl, field, value){
dojo.forEach(gl.graphics,function(gr){
gr.visible = (gr.attributes[field] == value);
});
gl.redraw();
}
... View more
03-04-2015
03:02 PM
|
2
|
0
|
1302
|
|
POST
|
There appears to be an issue with the map tile creation process. As soon as the map zooms to level 13 there are missing tiles. I would look into recreating the tiles with Manage Map Server Cache Tiles tool and use the RECREATE_EMPTY_TILES update mode.
... View more
03-04-2015
02:11 PM
|
0
|
0
|
597
|
|
POST
|
If the proxy is set up then the API should automatically use it when it needs to. However, there are some settings that you can configure (from Using the proxy | Guide | ArcGIS API for JavaScript 😞 Using the proxy In order for your application to route requests through the proxy you must add code to your application to define the location of the proxy. If all requests in your application will use the same proxy you can specify the proxy location using proxyUrl . You can also specify whether or not the proxy should always be used for communication using alwaysUseProxy esriConfig.defaults.io.proxyUrl = "<url_to_proxy>"
esriConfig.defaults.io.alwaysUseProxy = false; In the code above, esriConfig refers to the object returned by the esri/config module. The proxyUrl setting needs to point to the proxy endpoint on the server that is hosting your page. You can also force the API to always use the proxy with the alwaysUseProxy setting. I would start by changing to alwaysUseProxy = true. Then test your page to make sure that requests are being routed through your proxy. Tools like Fiddler can help show you what HTTP requests are being made from your machine.
... View more
03-04-2015
02:02 PM
|
1
|
7
|
3374
|
|
POST
|
This question is a bit vague - how are you adding the shapefile to a javascript map? If you are talking about a FeatureLayer then you can use setDefinitionExpression: Set's the definition expression for the FeatureLayer. Only the features that match the definition expression are displayed. A definition expression limits the features available for display and queries by applying constraints to the layer's attribute fields. If you are talking about an ArcgisDynamicMapServiceLayer then you can use setlayerdefinitions: Sets the layer definitions used to filter the features of individual layers in the map service.
... View more
03-04-2015
01:14 PM
|
0
|
0
|
1302
|
|
POST
|
Hi Tom - a very similar question was asked recently: Re: How to get linear distance units of a layer? In short, the SpatialReference class does not contain a property for linear units.
... View more
03-03-2015
02:34 PM
|
0
|
5
|
1983
|
|
POST
|
ArcGIS feature services are designed to provide data when requested. I don't think there is any built in functionality to push data out at regular intervals - although you could possibly develop a Server Object Extension to do this. If you have control over the JSON web service why not request data from the ArcGIS feature service at regular intervals and process the results into your own service?
... View more
03-03-2015
02:09 PM
|
0
|
0
|
446
|
|
POST
|
Interesting pick-up Sarah. I haven't noticed Chrome backfilling objects in the console before. I did a quick test (make sure to open the developer tools console and hit F5) and found that if you do not immediately expand the object node to view its properties then the object is updated retroactively by Chrome:http://jsbin.com/hakuyuhevi/3 Also, note that the information in line 1 shows list2: Array[0]. However, if you expand the object node before the code has populated the array, list2 shows as empty: This is definitely something to be aware of in debugging.
... View more
03-03-2015
01:54 PM
|
0
|
0
|
1717
|
|
POST
|
If you need to figure out the units dynamically in ArcObjects you can do this using the IProjectedCoordinateSystem.CoordinateUnit property. This returns an ILinearUnit which has a Name property and MetersPerUnit property that is useful for any conversions you may need to apply to your buffer distance.
... View more
03-02-2015
06:57 PM
|
1
|
0
|
995
|
|
POST
|
I think Sarah Clark is correct that you are probably attempting to access the graphics before they have been loaded. However, I would use the update-end event instead of the load event. The load event fires when the layer properties are populated, the update-end event should fire when all graphics have finished loading. load event: Fires after layer properties for the layer are successfully populated. update-end event: Fired when the layer has finished updating its content. if you are only interested in listening to this event the first time the feature layer loads look into on.once().
... View more
03-02-2015
06:37 PM
|
1
|
4
|
1717
|
|
POST
|
You could create a table to store this information and then use a Relate to link it to the point feature class. For example, something like this: Habitat (point feature class) - Shape - HabitatId - other fields... Sightings (table) - HabitatId - SpeciesName - CommonName - DateObserved The Sightings table could be related to the Habitat feature class using a common field HabitatId.
... View more
03-01-2015
06:09 PM
|
1
|
1
|
604
|
|
POST
|
The Summary Statistics tool will produce a separate table. You can always join this back to your original data if you want to use the values for labels, etc.
... View more
02-26-2015
02:44 PM
|
0
|
0
|
1317
|
|
POST
|
The run function is an asynchronous task - you may be attempting to use the parcels variable before the run function has assigned anything to it. I haven't tried leaflet yet but you should look into promises.
... View more
02-26-2015
01:55 PM
|
0
|
1
|
1391
|
|
POST
|
As Rene has stated it looks like you may need to project your coordinates before adding them to a map. This can be done using a third-party library or an ESRI geometry service.
... View more
02-26-2015
01:31 PM
|
0
|
0
|
4362
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-07-2014 06:13 PM | |
| 1 | 08-25-2015 02:04 AM | |
| 1 | 10-07-2014 03:54 PM | |
| 1 | 08-07-2014 09:19 PM | |
| 1 | 03-04-2015 02:02 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-21-2021
06:32 PM
|