|
POST
|
Trying to get a FindTask working via this sample and the only difference between my code and the samples that I can see is that the sample data has a find operation enabled. (See pic) I can't find in my server manager where to enable this. And is it even necessary. Right now the search isn't returning any results.
... View more
10-09-2012
05:26 AM
|
0
|
1
|
1097
|
|
POST
|
hmm. I like the look and feel of what I have, is there any addition I can use to add some sort of title with the code I currently have?
... View more
10-05-2012
12:46 PM
|
0
|
0
|
1176
|
|
POST
|
You'll also need to remove the 'setFeatures' code. Can you post your full code? I really appreciate your help. Attached is my code. Full disclosure: its a mess 🙂 I'm a novice.
... View more
10-05-2012
11:50 AM
|
0
|
0
|
1176
|
|
POST
|
thanks for the help. You are right, that is what I've done, however, when I comment that line out, the infowindow does not show at all.
... View more
10-05-2012
10:25 AM
|
0
|
0
|
1176
|
|
POST
|
just to be clear are you trying to show a clickable link to the associated infosheet in your popup? I did something similar: var template = new esri.InfoTemplate("",
"<b>Control Station:</b> <a target='_blank' href=http://gisdev2/surveybenchmarks/scans/${Corner Point Identifier}.pdf>${Corner Point Identifier}</a> <br><b>"
);
"
... View more
10-05-2012
09:55 AM
|
0
|
0
|
638
|
|
POST
|
Craig, If you are using the InfoTemplate with an InfoWindow (not a esri.dijit.Popup) then the title should display. Hmm, As far as I can tell that is what I'm doing? function mapReady(map){
dojo.connect(map,"onClick",executeIdentifyTask);
//create identify tasks and setup parameters
identifyTask = new esri.tasks.IdentifyTask("http://gisproduction/arcgis/rest/services/Dynamic/Zoning/MapServer");
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
//Choose which layers in the array you would like to be ID'd in the popup
identifyParams.layerIds = [0,1,5];
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
}
function executeIdentifyTask(evt) {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
var deferred = identifyTask.execute(identifyParams);
deferred.addCallback(function(response) {
// response is an array of identify result objects
// Let's return an array of features.
return dojo.map(response, function(result) {
var feature = result.feature;
feature.attributes.layerName = result.layerName;
if(result.layerName === 'Zoning Classifications'){
console.log(feature.attributes.NAME);
var template = new esri.InfoTemplate("Zoning", "<b>Zoning:</b> ${Zoning Classification} <br/> <b>Description:</b> ${Zoning Description} <br/> <b>File:</b> ${File Name}");
feature.setInfoTemplate(template);
}
else if (result.layerName === 'Control Corners'){
var template = new esri.InfoTemplate("Survey Benchmarks", "<b>Control Station:</b> <a target='_blank' href=http://gisdev2/surveybenchmarks/scans/${Corner Point Identifier}.pdf>${Corner Point Identifier}</a> <br/> <b>X Coordinate:</b> ${X or East Coordinate} <br/> <b>Y Coordinate:</b> ${Y or North Coordinate}");
feature.setInfoTemplate(template);
}
return feature;
});
});
// InfoWindow expects an array of features from each deferred
// object that you pass. If the response from the task execution
// above is not an array of features, then you need to add a callback
// like the one above to post-process the response and return an
// array of features.
map.infoWindow.setFeatures([ deferred ]);
map.infoWindow.show(evt.mapPoint);
... View more
10-05-2012
09:29 AM
|
0
|
0
|
1254
|
|
POST
|
Kelly, Does the same go for the infoTemplate? I have the following code and it is not displaying the title either in the dark gray title bar or in the content area: if(result.layerName === 'Zoning Classifications'){
console.log(feature.attributes.NAME);
var template = new esri.InfoTemplate("Zoning", "<b>Zoning:</b> ${Zoning Classification} <br/> <b>Description:</b> ${Zoning Description} <br/> <b>File:</b> ${File Name}");
feature.setInfoTemplate(template);
... View more
10-04-2012
09:42 AM
|
0
|
0
|
1254
|
|
POST
|
I'd like to duplicate the search feature in the Parks Finder app, where there is a radio button to choose the type of search. I'd like to be able to search by parcel # or address. It looks like the applicable code is spread between a few of the files (utils.js, config, default) so that makes it a little tough for me to decipher how to put it together in one file (still a novice) to make it work. As my app stands now, I have a functional search feature (by address only), so I don't necessarily need to blow that up to create an exact duplicate, but I'm not sure how to go about adding the parcel search to what I have either. For what its worth, here is the search code in my app currently: //Create Search Function
function locate() {
map.graphics.clear();
var address = {"SingleLine":dojo.byId("address").value};
locator.outSpatialReference= map.spatialReference;
var options = {
address:address,
outFields:["Loc_name"]
}
locator.addressToLocations(options);
}
function showResults(candidates) {
var candidate;
var symbol = new esri.symbol.SimpleMarkerSymbol();
var infoTemplate = new esri.InfoTemplate("Location", "Address: ${address}<br />Score: ${score}<br />Source locator: ${locatorName}");
symbol.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_ROUND);
symbol.setColor(new dojo.Color([153,0,51,0.75]));
var geom;
dojo.every(candidates,function(candidate){
console.log(candidate.score);
if (candidate.score > 80) {
console.log(candidate.location);
var attributes = { address: candidate.address, score:candidate.score, locatorName:candidate.attributes.Loc_name };
geom = candidate.location;
var graphic = new esri.Graphic(geom, symbol, attributes, infoTemplate);
//add a graphic to the map at the geocoded location
map.graphics.add(graphic);
//add a text symbol to the map listing the location of the matched address.
var displayText = candidate.address;
var font = new esri.symbol.Font("16pt",esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL,esri.symbol.Font.WEIGHT_BOLD,"Helvetica");
var textSymbol = new esri.symbol.TextSymbol(displayText,font,new dojo.Color("#610B0B"));
textSymbol.setOffset(0,8);
map.graphics.add(new esri.Graphic(geom, textSymbol));
return false; //break out of loop after one candidate with score greater than 80 is found.
}
});
if(geom !== undefined){
map.centerAndZoom(geom,15);
}
}
... View more
10-04-2012
04:31 AM
|
0
|
2
|
879
|
|
POST
|
did you add the required CSS tag new in 3.2? <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
... View more
10-03-2012
10:31 AM
|
0
|
0
|
937
|
|
POST
|
Is anybody aware of a good home page template similar to what is used HERE? We don't use ArcGIS Online, but I like the look of the configurable home pages they offer.
... View more
10-01-2012
05:22 AM
|
0
|
0
|
558
|
|
POST
|
using dojo.fx.Toggler. Wound up getting it to work by using a little css. My original css wasn't working because I had set position:absolute; Once I changed it to position:relative; I was able to add a right:80px; to move the drop down to look centered under the button.
... View more
09-27-2012
09:21 AM
|
0
|
0
|
494
|
|
POST
|
I'd like my buttons to open the content pane from either the middle or right of the content drop down. The default seems to be from the left side. I'm running into issues with the content going off the page and causing the user to need to scroll right. Any ideas?
... View more
09-26-2012
09:50 AM
|
0
|
3
|
1024
|
|
POST
|
Thanks. That was more or less what I was going for. On a slightly related note: I need my buttons to open the contentpane from the middle. The default seems to be to open from the left. Any ideas how to go about this? I'm running into trouble with my button content running off the viewable page resulting in the user needing to scroll right..
... View more
09-26-2012
09:22 AM
|
0
|
0
|
954
|
|
POST
|
Random Question: Trying to get a legend symbol/icon/picture to use as a button. Something that is just an image with no text on it. My basic google searches of "legend icon" "map legend icon "legend image" etc are showing up with either gaming pictures, or photos of bob marley. Can anybody point me towards a good image to use?
... View more
09-26-2012
07:02 AM
|
0
|
4
|
2881
|
|
POST
|
You need to link to the css. Ex. <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/esri/dijit/css/Popup.css">
... View more
09-25-2012
07:40 AM
|
0
|
0
|
472
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-16-2014 09:52 AM | |
| 6 | 06-12-2013 08:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|