POST
|
I'm currently using the SimpleViewer template and want to customize the zoom scale for the resulting polygon that is returned in the search. It appears that it has a default zoom scale (1000 in the API reference) set within the Search widget, but when I try and add the zoomScale property with my desired scale, it still uses the default setting. I am thinking that this can be set somewhere within the graphics layer that is produced by the returned result, within the feature layer or within the infoWindow result? I'm not sure what is the best way to implement this. Here is the snippet for the search widget and its properties when it is instantiated: var options = { map: this.map, addLayersFromMap: true, enableInfoWindow: true, minCharacters: 3, zoomScale: 4514 }; var searchLayers = false; var search = new Search(options, domConstruct.create("div")); Any help is appreciated. Thanks. Geoff
... View more
04-06-2015
12:39 PM
|
0
|
3
|
3718
|
POST
|
Kelly, I want to change the color of polygon graphics returned by a successful search. The current result is orange (227,139,79,0.8). I'm not sure if this can be done with CSS or not. Thanks, Geoff
... View more
04-03-2015
01:15 PM
|
0
|
1
|
1058
|
POST
|
I am currently working on customizing the Simple Viewer javascript template and was wondering the best way to change the graphic color on a result from the new Search Widget (on a feature service)? I have found the location of the default color settings, basic.js, but am trying to figure out the best way to override these settings. Any help is appreciated. Thanks, Geoff
... View more
04-03-2015
12:35 PM
|
0
|
4
|
5142
|
POST
|
Russell, A good place to start would be the query and select samples located here. Geoff
... View more
01-02-2014
04:04 AM
|
0
|
0
|
781
|
POST
|
Thanks Ben. The borderContainer.resize() appears to have resolved it. Geoff
... View more
12-12-2013
03:48 AM
|
0
|
0
|
1133
|
POST
|
Thanks Ken. It didn't fix the underlying issue but it did speed up the performance of the queries quite a bit. Geoff
... View more
12-11-2013
08:25 AM
|
0
|
0
|
1133
|
POST
|
I have various query tasks that will zoom to the result in the map in my application. The extent that is zoomed to is offset towards the bottom if a single result is returned and if there are multiple results, all of them are not shown on the map. When I resize the footer, for some reason everything then works as it is supposed to. My script that zooms to the points is: function showResults(featureSet) { var filterArray = []; map.graphics.clear();//clear graphics from map map.infoWindow.hide();//hide infowindow var resultFeatures = featureSet.features;//Performance enhancer - assign featureSet array to a single variable. for (var i = 0, il = resultFeatures.length; i < il; i++) {//loop through all features if (resultFeatures.length == 1) { var graphic = resultFeatures; graphic.setSymbol(symbol); nameGraphic = map.graphics.add(graphic); var thePoint = resultFeatures[0].geometry;//get single point map.centerAndZoom(thePoint, 4);//can add zoom level too } else if (resultFeatures.length > 1) { graphic = resultFeatures //var extent = resultFeatures[0].geometry.getExtent().expand(1.5); var extent = esri.graphicsExtent(graphic);//get graphics extent of more than 1 feature map.setExtent(extent, true); //use to get whole extent//map.setExtent(extent.expand(3)); } else { var myFeatureExtent = esri.graphicsExtent(resultFeatures); map.setExtent(myFeatureExtent); } if (resultFeatures.length == 1) { msg = resultFeatures.length + " Feature Selected" document.getElementById('selectedPane').innerHTML = msg; } else { msg = resultFeatures.length + " Features Selected" document.getElementById('selectedPane').innerHTML = msg; } } } I'm not sure if this is a map resize or CSS issue. Has anyone encountered something similar? Here are a couple screenshots as examples: Before resize:[ATTACH=CONFIG]29768[/ATTACH] After resize: [ATTACH=CONFIG]29769[/ATTACH] Thanks, Geoff
... View more
12-11-2013
05:14 AM
|
0
|
6
|
1545
|
POST
|
I'm guessing they are getting ready to release the next version of the API as I saw an update to Silverlight was posted yesterday.
... View more
12-07-2013
07:27 AM
|
0
|
0
|
847
|
POST
|
I also cannot reference the api either. None of my apps are working. The error i am getting is: TypeError: n.specificity is undefined The resource from this URL is not text: http://js.arcgis.com/3.7/ All of the samples are also not working. Geoff
... View more
12-07-2013
06:24 AM
|
0
|
0
|
847
|
POST
|
Thanks for the link to the ToggleButton. I'm going to try and use this. Meanwhile I was able to get the checkoxes working properly. Here is the working javascript function. I wasn't sure how to remove the first "and" out of the where clause so I just stripped out the unnecessary string. function onFilterClick() {
map.graphics.clear();
map.infoWindow.hide();
filter = [];
// dojoQuery is the alias of module dojo/query
dojo.query(".clsFilter").forEach(function (aFilterNode) {
if (aFilterNode.checked) {
//filter += " AND " + whereClause[aFilterNode.id]
filter += filter ? " AND " + whereClause[aFilterNode.id] : whereClause[aFilterNode.id];
}
});
query.where = filter.substr(5);
queryTask.execute(query, showResults);
//lstrip(s, chars)
populateGrid(Memory, query.where); //populate dgrid with results
fl.setDefinitionExpression(query.where);
}; Thanks again, Geoff
... View more
11-12-2013
09:51 AM
|
0
|
0
|
1003
|
POST
|
Thanks Jason. I'll start incorporating the check boxes as a starting point to get things functioning. I know this will be helpful. However the final product for this application will have to use buttons that will be "pressed" as the user chooses each filter. I'll then add in a button to reset all of the filters. See the screenshot below. Right now only one can be selected at a time. Thanks, Geoff
... View more
11-08-2013
09:36 AM
|
0
|
0
|
1003
|
POST
|
In my application I have a few filters (as buttons) that are currently applying a definition query to a feature layer. Currently you can only select one button at a time and add one definition query. Is there a preferred method to incorporating multiple button clicks into a single feature layer query? I feel like this may need to be done with a graphics layer and not against a feature layer. Each button click has the following callback but I need to apply both of these clicks/queries to the resulting map features : function executeHandicapQuery(handicapBtn) { map.graphics.clear(); map.infoWindow.hide(); elm = dojo.byId('handicapBtn'); str = "Yes"; query.where = "HANDICAPACCESS = '" + str + "'"; queryTask.execute(query, showResults); populateGrid(Memory, query.where);//populate dgrid with results fl.setDefinitionExpression(query.where); } function executeRestroomQuery(restroomBtn) { map.graphics.clear(); map.infoWindow.hide(); elm = dojo.byId('restroomBtn'); str = "Yes"; query.where = "RESTROOMS = '" + str + "'"; queryTask.execute(query, showResults); populateGrid(Memory, query.where);//populate dgrid with results fl.setDefinitionExpression(query.where); } These functions are then passed to the showResults function and zoom to the result extent: function showResults(featureSet) { //map.graphics.clear();//clear graphics from map map.infoWindow.hide();//hide infowindow var resultFeatures = featureSet.features;//Performance enhancer - assign featureSet array to a single variable. for (var i = 0, il = resultFeatures.length; i < il; i++) {//loop through all features if (resultFeatures.length == 1) { var graphic = resultFeatures; graphic.setSymbol(symbol); //Set the infoTemplate. //graphic.setInfoTemplate(infoTemplate); //Add graphic to the map graphics layer. nameGraphic = map.graphics.add(graphic); var thePoint = resultFeatures[0].geometry; map.centerAndZoom(thePoint, 5); } else if (resultFeatures.length > 1) { graphic = resultFeatures var extent = esri.graphicsExtent(graphic); map.setExtent(extent); //use to get whole extent//map.setExtent(extent.expand(3)); } else { var myFeatureExtent = esri.graphicsExtent(resultFeatures); map.setExtent(myFeatureExtent); } //msg = "Selected Features:" + "\n" + resultFeatures.length //document.getElementById('rightPane').innerHTML = msg; } } Thanks, Geoff
... View more
11-08-2013
04:38 AM
|
0
|
4
|
3117
|
POST
|
Thanks everyone for your help! I made Tracy's change to Jason's post and it's good to go. Steve, I did try yours out but I wasn't able to get it configured correctly. Geoff
... View more
10-28-2013
01:19 PM
|
0
|
0
|
1611
|
POST
|
Jason, I tried making your changes as suggested but I am still having the same issue. Geoff
... View more
10-28-2013
11:07 AM
|
0
|
0
|
1611
|
Online Status |
Offline
|
Date Last Visited |
05-17-2023
04:11 PM
|