|
POST
|
i took another look at this after you replied to jian's thread and was able to adapt your sample to get legend swatches for "Hostile Units" to display using the following code //add only a layer which is embedded in a single group layer
dynamicMapServiceLayer.setVisibleLayers([6]);
//...
//make sure both the group layer and sublayer are referenced in the subLayerIds
legendLayer.subLayerIds = [0,6] for the the Lansing river and Areas layer (which is embedded in a group layer inside another group layer) i was able to get swatches using the following dynamicMapServiceLayer.setVisibleLayers([8]);
//...
legendLayer.subLayerIds = [0,7,8] i'm not positive, but i think your problems with layers 2,3,4,5 is that the dozens and dozens of symbols won't fit in the space allocated to the legend
... View more
09-11-2012
09:23 PM
|
0
|
0
|
626
|
|
POST
|
when comparing the JSON the API sends as a "Web_Map_as_JSON" parameter for normal layers (which generate a legend swatch) and layers within group layers (which do not), they look identical. this leads me to believe that the problem displaying patches is occurring server side. working "legendOptions" : {
"operationalLayers" : [{
"id" : "Boundaries",
"subLayerIds" : [1]
} not working "legendOptions" : {
"operationalLayers" : [{
"id" : "Boundaries",
"subLayerIds" : [8]
}
]
} if you haven't already, can you confirm the same? if so, the ArcGIS Server general forum might be a good next step...
... View more
09-11-2012
04:37 PM
|
0
|
0
|
626
|
|
POST
|
Vikrant and i were able to confirm that as long as the feature layers are instantiated in the order they are displayed in the map, the infoWindow displays the attributes which correspond with the correct layer.
//instantiate the featureLayer you would like to draw on top first
pointsOfInterest = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //QUERY_SELECTION is working as well
outFields: ['*']
});
//second
WildfireLine = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/1",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //QUERY_SELECTION is working as well
outFields: ['*']
});
//polygons last
evacuationPerimeter = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/2",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //QUERY_SELECTION is working as well
outFields: ['*']
});
//in the array of featureLayers to add, specify the bottom layer first
map.addLayers([evacuationPerimeter,WildfireLine,pointsOfInterest]);
... View more
09-11-2012
03:50 PM
|
0
|
0
|
481
|
|
POST
|
its not exactly the same as forcing the infoWindow to utilize a different anchor, but I was able to pan the map to ensure that the entire infoWindow is displayed using the following code... //set a global fixed anchor for the infoWindow when the application loads (initEditing might be a good place)
map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT);
//afterwards wire up the event handling to make sure the map will pan if the entire infoWindow isn't going to fit on the screen
dojo.connect(map.infoWindow, "onShow", function() {
//Determine the upper right, and center, coordinates of the map
var maxPoint = new esri.geometry.Point(map.extent.xmax, map.extent.ymax)
var centerPoint = new esri.geometry.Point(map.extent.getCenter());
//Convert these to screen coordinates
var maxPointScreen = map.toScreen(maxPoint);
var centerPointScreen = map.toScreen(centerPoint);
//Subtract the size of the infoWindow, including a buffer.
//This will show whether the infoWindow would spill out of the current view.
var xDiff = Math.abs(maxPointScreen.x - map.infoWindow.coords.x) - 435;
var yDiff = Math.abs(maxPointScreen.y - map.infoWindow.coords.y) - 285;
//If required, recalculate a new centerpoint which accounts for the infoWindow
if (xDiff < 0) {centerPointScreen.x -= xDiff;}
if (yDiff < 0) {centerPointScreen.y += yDiff;}
//Pan the map to the new centerpoint (in map coordinates)
centerPoint = map.toMap(centerPointScreen);
map.centerAt(centerPoint);
});
... View more
09-11-2012
03:43 PM
|
0
|
0
|
413
|
|
POST
|
currently the Javascript api supports WMS (and WMTS) but not WFS. the closest public idea i could find to vote on is http://ideas.arcgis.com/ideaView?id=0873000000087UwAAI our internal tracking number is [NIM056143: ArcGIS Server JavaScript API needs support to consume WFS services...] please feel free to vote on ideas.arcgis.com and/or contact technical support to show your interest in this feature's inclusion in the future.
... View more
09-04-2012
08:53 AM
|
0
|
0
|
900
|
|
POST
|
this is just a shot in the dark, but you might check to make sure you have the following IIS components installed. http://blogs.esri.com/esri/arcgis/2008/07/03/installing-on-windows-vista-and-windows-server-2008-which-iis-components-are-required-for-the-web-applications-install-feature-of-arcgis-server-for-the-microsoft-net-framework/ also, i'm not sure what sites you are testing, but i've experienced intermittent problems bouncing tests off of google. you're testing the following, correct? http://localhost/[proxyfolder]/proxy.ashx?http://esri.com is the error the same in all browsers?
... View more
08-30-2012
12:28 PM
|
0
|
0
|
821
|
|
POST
|
when working with featurelayers using a definition expression gives you the ability to separate features based on SQL expressions and working in selection mode allows you to query for individual features spatially and only draw specific items. i still don't know if i understand exactly what your workflow is, but i think either one or the other of these techniques would be the most straightforward way to go.
... View more
08-30-2012
12:00 PM
|
0
|
0
|
831
|
|
POST
|
if the global mustMatch policy in the proxy is set to "false" the proxy isn't evaluating URLs to confirm that they are in the list. this means the 403 permission error is being generated by another component. are you using the default application pool? is Anonymous Authentication enabled for the app? does it make any difference if you use 127.0.0.1 instead of localhost? machinename?
... View more
08-30-2012
11:18 AM
|
0
|
0
|
821
|
|
POST
|
i just did a quick test and it seems that an "invalid application path" error when converting an application is normal for working proxies as well. in IIS manager, do you have handler mappings for .ashx files?
... View more
08-30-2012
10:00 AM
|
0
|
0
|
1976
|
|
POST
|
its normal to see an error when you try to access the proxy without attempting to forward a url, but you should definitely be able to forward traffic if you aren't restricting sites. did you convert the proxy folder to an application in IIS?
... View more
08-30-2012
09:38 AM
|
0
|
0
|
1976
|
|
POST
|
have you considered creating a separate GraphicsLayer for your selected features instead of attempting to maintain invisible symbology?
... View more
08-30-2012
08:51 AM
|
0
|
0
|
831
|
|
POST
|
are you working with the sample ASP.NET proxy from the Javascript resource center? if you haven't already, please try setting the global flag "mustMatch" to false to see whether you can forward traffic to a standard webpage directly from the browser. ie: http://localhost/proxy/proxy.ashx?http://esri.com
... View more
08-30-2012
08:39 AM
|
0
|
0
|
1976
|
|
POST
|
this is a known issue. check out Tanu's reply in the ArcGIS Server thread below for steps to resolve issues in output PDFs. http://forums.arcgis.com/threads/64057-Export-WebMap-PDF-Legend
... View more
08-28-2012
09:25 AM
|
0
|
0
|
1316
|
|
POST
|
@dlimos thanks for sharing your approach! i logged an enhancement a while back requesting that the widget be extended to support output in projected coordinates as well, but haven't seen much customer interest since. [NIM073060: For location tool in Measurement Widget, include option to toggle between projected coordinates and lat/long.] if you are interested in this issue, please feel free to log a tech support call and request to be added to the above NIM. This helps our developers prioritize their work.
... View more
08-28-2012
08:18 AM
|
0
|
0
|
1474
|
|
POST
|
to work with a coordinate system whose WKID is not recognized, you will have to create the Spatial Reference object using WKT (well-known text) instead var sr = new esri.SpatialReference('GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",
SPHEROID["WGS_1984",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'
); http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/spatialreference.htm
... View more
08-27-2012
11:06 AM
|
0
|
0
|
326
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|