|
POST
|
No worries! I had a little wonkty tidbit in my code since it's also trying to create a unique list for my filteringSelect. Glad you got it squared away!
... View more
10-28-2013
01:28 PM
|
0
|
0
|
3161
|
|
POST
|
I've used a FilteringSelect successfully but my coding is a little different. The javaScript code: //Push the list of road names into the combo box
query = new esri.tasks.Query();
query.where = "1=1";
query.outFields = ["*"];
query.returnGeometry = false;
var queryTask = new esri.tasks.QueryTask(SERVERPATH);
queryTask.execute(query,populateRdNameCbo);
.
.
.
function populateRdNameCbo(results) {
//Populate the dropdown list box with unique values
values = [];
testVals = {};
features = results.features;
dojo.forEach (features, function(feature) {
curName = feature.attributes.FULLNAME;
if (!testVals[curName]) {
testVals[curName] = true;
values.push({"OBJECTID":feature.attributes.OBJECTID,"RDNAME":feature.attributes.FULLNAME});
}
});
dataItems = {
identifier: "OBJECTID",
label: "RDNAME",
items: values
};
theStore = new dojo.data.ItemFileReadStore({data:dataItems});
dijit.byId("cboRdName").set("store", theStore);
} My HTML for the combo box is: [HTML]<input id="cboRdName" dojoType="dijit.form.FilteringSelect" searchAttr="RDNAME" name="WidgetName" pageSize="6" fetchProperties="{sort:[{attribute:'RDNAME', descending:false}]}" placeHolder="Select a road or start typing" onChange="updateCrossStreetList();closureProps['rdName'] = document.getElementById('cboRdName').value;closureProps['status'] ='CLOSED';zoomToRoad()"/>[/HTML] This is using v3.4 of the API. Steve
... View more
10-28-2013
09:07 AM
|
0
|
0
|
3161
|
|
POST
|
Unfortunately I don't have any actual code to share but here's an idea- Query the polygons for the one poly that does intersect your point feature. Take note of the polygon's OBJECTID Select all polygons using a "1=1" query. Construct an array of OBJECTIDs for all polygons. Remove the OBJECTID from the array for the polygon that did overlap the point feature Reselect the polygons based on the array of OBJECTIDs That should get you what you want. I think. 😄 [EDIT: this might make it easier. Once you have the overlapping polygon's OBJECTID, re-query the polygons for "OBJECTID <> (overlapping polygon OBJECTID)"] Steve
... View more
10-28-2013
07:19 AM
|
0
|
0
|
949
|
|
POST
|
I have no idea but I wonder if this is at all related to a mobile-centric issue that Derek provides a workaround in this thread. Seems like a quick & easy thing to try! Steve
... View more
10-22-2013
01:46 PM
|
0
|
0
|
2347
|
|
POST
|
Your code looks like mine (I borrowed from a sample as well) but maybe you're trying to combine too many things together in your route symbol setup? My (legacy) code is something like this: function showRoute(solveResult) {
routeSymbol = new esri.symbol.SimpleLineSymbol().setColor(new dojo.Color([255,0,0,0.8])).setWidth(4);
theRoute = solveResult.routeResults[0].route;
theRoute.setSymbol(routeSymbol);
map.graphics.add(theRoute);
Only big difference I see is that you combined a few lines of code into your mapMain.graphics.Add() line of code. Steve
... View more
10-14-2013
01:41 PM
|
0
|
0
|
1584
|
|
POST
|
I don't use this but took a quick look at it in Firefox with Firebug. Looks like the reference to the broadband service is located in the config.js file at line 135. Outside of this, search the various JS files for references to "PopulateBroadBandInformation" (Utils.js line 1289) and then comment out any call to it. That appears to be the function that queries the service for information and then populates the tab. Good luck! Steve
... View more
10-10-2013
01:12 PM
|
0
|
0
|
2272
|
|
POST
|
With a single point returned, try expanding the extent that you extract from the point. Something like this: var theExtent = features[0].geometry.getExtent().expand(1.5); map.setExtent(theExtent); In my own apps, this is how I expand the extent of a point feature: var thePoint = features[0].geometry; var theExtent = pointToExtent(map,thePoint,15); map.setExtent(theExtent); //============================================================================= // Utility routine to convert a point's geographic location into a rectangle. // Used to provide a zoom extent for point features //============================================================================= function pointToExtent(map, point, toleranceInPixel) { //Function to convert a point coordinate into a rectangle area var pixelWidth = map.extent.getWidth() / map.width; var toleraceInMapCoords = toleranceInPixel * pixelWidth; return new esri.geometry.Extent( point.x - toleraceInMapCoords, point.y - toleraceInMapCoords, point.x + toleraceInMapCoords, point.y + toleraceInMapCoords, map.spatialReference ); } Good luck! Steve
... View more
10-10-2013
12:41 PM
|
0
|
0
|
1663
|
|
POST
|
My organization is currently at the 10.1 license level for desktop ArcGIS as well as ArcGIS Server. We're having a ton of stability issues with our internal 10.1 development server instance of ArcGIS Server so we're considering updating it to 10.2 to see if this corrects our problems. One question that came up was whether or not desktop 10.1 would still be able to publish to a 10.2 instance of ArcGIS Server (our desktop installs will still remain on 10.1 for the forseeable future). Can anyone confirm whether or not we might have any issues publishing services from desktop 10.1 if we upgrade ArcGIS Server to 10.2? Thanks! Steve
... View more
10-10-2013
08:14 AM
|
0
|
2
|
906
|
|
POST
|
So recently I began getting a weird error in an application I've been developing when using the Export Web Map Task. My application will reside within our network but here's a link to a public facing version: http://gismaps.snoco.org/ej_explorer/ So, in the application, the various points and lines represent projects. When the user clicks on one, a popup appears and within the popup is an option to run a summary report. The code for the summary report by census tract also includes a section which creates a JPEG "vicinity map" and inserts the output JPEG into the report generated (this is created on the fly with HTML in a new browser window). [Note: Most of the report is generated immediately but the JPEG map & the section immediately preceeding it might have a slight day before appearing] If I run the summary report by census tract on a line based project, everything works fine. If I run it on a point based project, the Export Web Map Task throws an error: {"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"map_graphics\": �?\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}} By playing around, I've figured out that the selected feature graphic for point features is what's choking the export. If I type "map.graphics.clear()" in the console before clicking the report button in my popup, the report (and export process) works correctly. I'm mystified as to why this is happening, especially since this was working fine a few months ago (I haven't touched the code in the linked version since the ESRI UC). Steve
... View more
10-09-2013
10:13 AM
|
0
|
2
|
1456
|
|
POST
|
Ok, I suddenly feel stupid and can't figure this out.. In my web app, I have both census tracts and block groups available as layers that my users can turn on or off. The layers are added to my app as DynamicMapServiceLayers. Up until this point, I published the census tract and block group datasets as seperate services and that all works just fine. I decided to change this recently and package both datasets into ONE service primarily because the auto generated labels within the service would overlay on top of each other and look crappy. I figured that if they were in the same MXD when published, the labeling mess wouldn't happen. I published them together and add them to my map like this: // Define the census tract map layer theTractLayer = new esri.layers.ArcGISDynamicMapServiceLayer(SERVERPATH + "/demography/censusBoundaries/MapServer/0", { visible: false }); // Define the census block group layer theBlockgroupLayer = new esri.layers.ArcGISDynamicMapServiceLayer(SERVERPATH + "/demography/censusBoundaries/MapServer/1", { visible: false }); After making this change, I now get a 400 Bad Request Error whenever I try to display either layer. Apparently the URL can't dive down into the service deeper than the "/MapServer" level. So how can I accomplish my goal of bundling the two datasets as one service but add them to my map as separate layers as far as JS is concerned? Thanks! Steve
... View more
10-09-2013
07:42 AM
|
0
|
3
|
2858
|
|
POST
|
I have not yet headed down this path but probably will have to sooner than later. Based on my own searches, it looks like you can either modify some of the existing templates located in a subfolder of your ArcGIS Server installation or create additional ones and then reference them during your PrintTask coding. Some example threads: This and this.
... View more
09-30-2013
02:16 PM
|
0
|
0
|
616
|
|
POST
|
I'm still trying to avoid the migration to AMD myself but I think you might need to focus on the API versions 3.4, 3.5, or 3.6. A good place to start is the "What's New" section of the Concepts site (link for the What's New for v3.4). I don't know about the custom module side of things but a few gotchas to pay attention to when moving from 2.8 to the 3.x series of APIs: 1. djConfig in your HTML header changes to dojoConfig 2. Remove any "lang=EN" from your <HTML> tag! For some darn reason, this breaks your app so, if you have it, remove it. 3. Any code that references the esri namespace can't run until after all the modules have loaded. In the 2.8 days, I might have a global variable for the initial extent declared outside of my initMap function like this: var initExtent = new esri.geometry.Extent({
"xmin": -13592500,
"ymin": 6060280,
"xmax": -13506825,
"ymax": 6166129,
"spatialReference": {"wkid": 3857}
}); This chokes in the 3.x APIs because of the esri.* reference. The solution is like this: var initExtent;
function initMap() {
initExtent = new esri.geometry.Extent({
"xmin": -13592500,
"ymin": 6060280,
"xmax": -13506825,
"ymax": 6166129,
"spatialReference": {"wkid": 3857}
});
}
dojo.Ready(initMap); I now also use dojo.Ready() instead of dojo.OnLoad() to call the map setup function at page load. I think these are the biggest issues in general when updating from v2.8. Hopefully someone else can provide some wisdom about your situation with the custom modules. Good luck! Steve
... View more
09-27-2013
12:12 PM
|
0
|
0
|
699
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Friday | |
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | Wednesday |