|
POST
|
Soon. ArcGIS.com is already using the next version of the JS API. We are finishing up some testing and tweaking some documentation. We hope to do the official release early next week. 2.6? You tease.
... View more
12-08-2011
08:03 AM
|
0
|
0
|
586
|
|
POST
|
I added some layers to my web map, am calling it using the arcgis javascript api 2.5 but for the legend i get "No legend" where the legend should be, can someone help me, almost throwing in the towel! I want to be able to call a layer by its id..something like.if one clicks on this symbol, show this layer thank you Please post your code, or a link to you public site. It is very difficult to understand what you are asking. If you get "No Legend" that usually means the legend service for your layers is not accessible. What version of server are you running? if <10 it uses ESRI's legend service. If >10 then it will use your local services. The legend is only that, there is no "on click" functionality to the symbols. It sounds like you are looking for a Table of Contents (TOC). The legend is not appropriate for that, as it is out of the box from ESRI.
... View more
12-05-2011
05:20 AM
|
0
|
0
|
378
|
|
POST
|
Hi, this may be stupidly easy, but I cannot pass a variable (geom) to another function. I defined geom globally, and it will display when I call the "innerHTML" within its own function, but when I put it in function gpit, it comes back undefined. I need to use geom to do other things within gpit, but can't seem to see it. Any ideas why I cannot do this? var geom;
function showResults(candidates, result) {
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_SQUARE);
symbol.setColor(new dojo.Color([153,0,51,0.75]));
dojo.every(candidates,function(candidate, geom){
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 };
var 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("#666633"));
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,12);
}
}
function gpit(geom){
dojo.byId("a").innerHTML = geom.x;
}; More than likely its a scoping issue. I don't see where you are calling gpit, you may try dojo.hitch(this, function()) to keep in scope.
... View more
12-01-2011
11:12 AM
|
0
|
0
|
1274
|
|
POST
|
Done 🙂 In May 😞 #NIM067830 When using symbology of unique values, getting a duplicate entry in the legend service of the REST endpoint Just checked. This bug was submitted may 5th, 2011. Medium Severity. Not fixed.
... View more
11-30-2011
07:28 AM
|
0
|
0
|
2655
|
|
POST
|
See: http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/kmlinfo.html Actually that link all references server side data. Since graphics are rendered client side, it would be impossible to export to KMZ as they would then have to be hosted somewhere,no?
... View more
11-28-2011
11:57 AM
|
0
|
0
|
661
|
|
POST
|
Richard, I think you're right. Perhaps we should be reporting this to the core ArcGIS Server or REST team, since it's nothing to do with the JS API. I'm not on maintenance so I can't log a bug report - can someone else do it? Cheers, Steve Done 🙂 In May 😞 #NIM067830 When using symbology of unique values, getting a duplicate entry in the legend service of the REST endpoint
... View more
11-28-2011
08:32 AM
|
0
|
0
|
2655
|
|
POST
|
I want to zoom to a feature (graphic) when a user selects it from a dojo filtering select list. This list is populated using a queryTask. Is it okay to execute a second queryTask that takes the same results and does something else with it? function HAPCexecuteQueryTask(fmc) {
HAPCquery.where = "FisheryManagementCouncil = '"+ fmc +"'";
HAPCqueryTask.execute(HAPCquery,populateList);
HAPCqueryTask.execute(HAPCquery,showResults);
} I have been looking at this example and it seems to be pretty close to what I want to do (see last entry for solution. http://forums.arcgis.com/threads/36317-Zoom-to-Graphic?highlight=graphics Instead of two queries, why not add an onclick event to the item in the List that zooms to the geometry? (if you showed your populatelist /showresults functions, it would help)
... View more
11-23-2011
09:20 AM
|
0
|
0
|
649
|
|
POST
|
I get it. Still, is there not a way to pull charts in only when you actually want to use charts in a popup? I guess I don't understand dojo well enough - it seems like a benefit of having a system which can pull in modules on demand would be the ability to avoid this very problem. sure, you could write you open popup, and conditionally load the requires based on whether or not a chart is included. Since the esri api preps for charts in the popup, it HAS to preload the module.
... View more
11-23-2011
06:31 AM
|
0
|
0
|
785
|
|
POST
|
Any update on this? we have the same problem. If there are 4 values (even groups) in the mxd, there should only be 4 values in the legend. Hi Guys, I am coming across the same problem. In fact, it is not a bug with the legend widget, it has to do with how the rest service is defined from your layer symbology setup in ArcMap. I am building my own custom TOC and this had me stumped for a while. It happens in two instances that I am aware of: - using "Unique values" in ArcMap, selecting a few categories and grouping them manually - using "Unique values, many fields" in ArcMap (example in the attached esri_001.jpg) When you check the rest service information, you will see some 17 entries under "Unique Value Infos: ". Which is essentially re-splitting your groups and undoing all your hard work! (abbreviated screenshot at esri_002.jpg) So, you can workaround by creating a new column, and manually creating unique categories, but since our data is held in someone else's database, this is not an option for us. Is there some other approach to this? And/or will ESRI be looking at why this happens in Rest and if it can be fixed? Thanks, Richard.
... View more
11-23-2011
05:58 AM
|
0
|
0
|
2655
|
|
POST
|
Now that google is showing Obliques, and with over vendors supporting oblique imagery, I was wondering if there is any way to "rotate" a map in the web APIs. Just wanted to get the conversation started. I know in my app it would completely destroy all my measurements, etc..
... View more
11-21-2011
11:55 AM
|
0
|
2
|
3143
|
|
POST
|
This functionality will be in the 3.0 release of the API which will come out when 10.1 is final. We are hoping to add support for dynamic layers at an upcoming 2.x release that will work with 10.1 beta/pre-release but haven't finalized those plans yet. Derek, just out of curiosity, will the functionality exist to PREVENT this as well. We have standards for symbols/colors,etc.. I would hate to think someone could just override it.
... View more
11-21-2011
07:49 AM
|
0
|
0
|
1018
|
|
POST
|
hi everyone, i am quite newbie on Javascript API, what i am trying to do is: i added new layers to the map and need to refresh or reload the map so i can see the new layer i tried many way mentioned here but nothing works http://forums.esri.com/Thread.asp?c=158&f=2396&t=259812 this is the error i get always. [08:59:28.833] _547 is undefined @ http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5compact:48 here is my code for this idea map.removeLayer(tiledMapServiceLayer); map.removeLayer(dynamicMapServiceLayer); var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("url"); map.addLayer(tiledMapServiceLayer); var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("url"); map.addLayer(dynamicMapServiceLayer); map.setExtent(map.extent); both addLayer and setExtent should refresh your map, but you are not creating valid layers. var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("url"); you are passing in the String "url", you need to send the actual url.
... View more
11-21-2011
05:25 AM
|
0
|
0
|
923
|
|
POST
|
you are using esri.InfoTemplate you need to use esri.dijit.PopupTemplate as per the example above
... View more
11-17-2011
12:00 PM
|
0
|
0
|
2922
|
|
POST
|
Derek The hover sample works fine. I also copied the source to the server and was able to run it no problem. I notice that the hover sample uses vml - this mime type IS defined on the server - but the svg mime type is not. Is there a sample that uses svg perhaps, which I could test. Thanks if you client is ie7/8 any graphics are rendered as vml, anything else (ie9, chrome, safari) are rendered as svg, regardless of the app.
... View more
11-17-2011
11:53 AM
|
0
|
0
|
1288
|
|
POST
|
😮 Doh! Note to self - when re-using code from Esri examples and other places, make sure you don't call stuff twice. I'd re-used some older code wit a scale bar, but had stripped out the initial definition, so it didn't work, then added the whole lot back in - result 2 bars, one metric the other "american" - Note to Esri, here in England we are trying very hard to use metric 😄 We did that in America back in the 80s. It didn't take.
... View more
11-17-2011
03:56 AM
|
0
|
0
|
774
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2014 08:35 AM | |
| 1 | 05-02-2012 04:56 AM | |
| 1 | 10-29-2021 07:40 AM | |
| 1 | 10-28-2021 05:26 AM | |
| 1 | 07-17-2012 08:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-01-2022
02:00 PM
|