|
POST
|
in re-reading your thread i think i understand now that you were attempting to substitute a webmap in a sample application that was previously relying on a map service. those two things are not interchangeable. the sample application i linked to above is still relevant, but if you would like to load in your content as a webmap (instead of using the urls of the services themselves), it might be handy to take a look at this example to see how a webmap can be loaded in a custom JS app using its ID.
... View more
05-20-2013
07:54 AM
|
0
|
0
|
1674
|
|
POST
|
if you need to support redline sketches that only need to be printed (not saved as GIS data), you should be able to get away with just using the printTask (which relies on ArcGIS Server 10.1)
... View more
05-20-2013
07:47 AM
|
0
|
0
|
1674
|
|
POST
|
in a tech support call June and i were able to identify that she already had a valid long-term token stored in her proxy which allowed her to successfully retrieve secure content. http://webserver/proxy/proxy.ashx?http://otherserver/arcgis/rest/services/Secure/MapServer The reason she couldn't see her secure layer in her web app (based on ArcGIS Online "Basic Viewer" template) was because of this line in App.js esri.config.defaults.io.alwaysUseProxy = false; Setting this property to true is a convenient request to force ALL the web traffic spawned by the application through the proxy (allowing the retrieval of secure content). check out the following article for more information on different ways of working with secure services in JS applications.
... View more
05-16-2013
12:56 PM
|
0
|
0
|
566
|
|
POST
|
what is the coordinate system of your dynamicMapService? the lat/long values you are currently using would only help you center the map if your own service was published in WGS84 or Web Mercator. try adding a basemap property (which ensures a web mercator tiledMapService is loaded first) in the map constructor to see what i mean. map = new esri.Map("mapDiv", {
basemap: "gray",
center:[-96,30],
});
... View more
05-16-2013
08:07 AM
|
0
|
0
|
512
|
|
POST
|
thanks for pointing that out. now i FINALLY understand what is going on. in this situation you are calculating a new value to use for your class breaks renderer on the fly without designating a new attribute column to store the value you calculated. (i think you already know this) the collection of graphics have to be sent to the server feature by feature, with a symbol defined (not renderer, which supports a label), rather than having a true class breaks renderer defined for the feature layer. If the field was present on the server we could just describe the renderer as class breaks and let ArcGIS Server draw things up on the fly). i tested actually adding a new field to the graphics layer based on this value instead of relying on a function within the renderer, but this doesn't work either (because when we send the new print request we now assume a field is present in the service that isn't actually there). function addNewAttribute() {
var myLayer = app.map.getLayer("CountyACSv4_5756");
myLayer.fields.push({"alias": "PERCENTOLD",
"editable": false,
"length" : null,
"nullable" : true,
"name" : "PERCENTOLD",
"type" : "esriFieldTypeString"
});
dojo.forEach(myLayer.graphics, function (graphic) {
graphic.attributes.PERCENTOLD = (graphic.attributes.AGE65PLUS / graphic.attributes.POP0711 * 100);
});
} unfortunately, i don't know how of a good way to work around this problem (other than ensuring that you have fields present in the data for values you need to render by.)
... View more
05-15-2013
04:49 PM
|
0
|
0
|
5450
|
|
POST
|
i took the time to adapt my simplified sample to pull your webmap and im still not seeing the same behavior as in your own application http://jsfiddle.net/jagravois/A6cuH/1/ with regard to passing a default symbol in a class breaks renderer in the webmap json, i think im seeing the same thing you are, and will work on putting together something even more straightforward to show the problem.
... View more
05-14-2013
02:09 PM
|
0
|
0
|
5450
|
|
POST
|
it sounds like it might be helpful in this case to use esri.setRequestPreCallback() to manipulate the webmap JSON immediately before executing the print.
... View more
05-13-2013
07:36 AM
|
1
|
0
|
6134
|
|
POST
|
i took your code and wrote up a really simplified sample where the symbology is actually passed to ArcGIS Server with a class breaks renderer defined for the layer (instead of defining symbols feature by feature). the only difference between my app and yours is that I am referencing a hardcoded featureLayer and you are pulling your layer from a webmap. i didn't realize till just now, but your own web_map_json defines the layer as a "featureCollection". i wonder why the hosted feature service ends up acting like a graphics layer?
"id" : "TractACSv4_4105",
"opacity" : 1,
"minScale" : 0,
"maxScale" : 0,
"featureCollection" : {
"layers" : [{
"layerDefinition" : {
"name" : "TractACSv4",
... View more
05-10-2013
04:14 PM
|
0
|
0
|
5450
|
|
POST
|
sorry, i misunderstood. you need to query for everything to populate your combobox. you say that when you execute a 1=1 query directly in the REST endpoint for the layer, the feature is present. if you set a breakpoint in your code and inspect the results, it is missing?
... View more
05-10-2013
11:14 AM
|
0
|
0
|
1131
|
|
POST
|
rather than querying for everything and then searching for 340124F, why not just query for the feature you want? query.where = "ENG_XING='340124F'" ;
... View more
05-10-2013
11:10 AM
|
0
|
0
|
1131
|
|
POST
|
based on my reading of the export webmap spec and a look at your own request, this is happening because you are currently passing a collection of graphics whose symbology is defined feature by feature, rather than in a class breaks renderer (defined within drawingInfo). if you're able to further whittle down your fiddle to use a single layer (and actually give an opportunity to redefine symbology based on population and race), it would be easier to see what your options are.
... View more
05-10-2013
11:04 AM
|
0
|
0
|
5450
|
|
POST
|
in my testing at bing.com/maps i've never been able to identify more than 20 levels of detail, and only in specific areas where data is available (for example at the corner of E79th St and 5th Ave in NYC). in order to push this additional level of detail to a Bing layer in the Esri JS API, you have to do something like this...
dojo.connect(veTileLayer, "onLoad", function() {
console.log("ve: ", veTileLayer);
veTileLayer.tileInfo.lods.push(new esri.layers.LOD({
level":20,"resolution":0.149291071,"scale":564.248588,"startTileRow":0,
"startTileCol":0,"endTileRow":1048575,"endTileCol":1048575
}));
veTileLayer.scales.push(564.248588);
map.addLayer(veTileLayer);
});
}
... View more
05-10-2013
08:01 AM
|
0
|
0
|
580
|
|
POST
|
rock and roll. im glad to hear we got you sorted out.
... View more
05-09-2013
03:30 PM
|
0
|
0
|
355
|
|
POST
|
finally solved the problem with my own proxy by removing an old invalid token which was stored in the proxy.config. probably not the same thing causing your problems though....
... View more
05-09-2013
02:24 PM
|
0
|
0
|
2100
|
|
POST
|
its failing with my ASP.NET proxy as well, so i don't think the problem is your proxy, but rather the server. Why not just point at the print service on servicesbeta2.esri.com instead? i didn't see any errors there, even when using my proxy.
... View more
05-09-2013
02:07 PM
|
0
|
0
|
2100
|
| 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
|