|
POST
|
Thanks, John. The documentation for routeParam is pretty vague so I wasn't sure about that. I think as a work around, I'll prompt the user to click along the desired street and then add the clicked point as a third stop along the desired route.
... View more
04-16-2013
06:58 AM
|
0
|
0
|
516
|
|
POST
|
I haven't dealt with this but a quick Google search revealed this.
... View more
04-12-2013
02:42 PM
|
0
|
0
|
1213
|
|
POST
|
Just came across this. We have a development sever within our organization (let's call it DMC) that is used for development web maps. I've mostly used v2.8 of the API but recently upgraded one app to v3.3 Yesterday I started developing a completely new app using one of the ESRI v3.4 samples as a starting point. I finally got around to adding in the basemap selection dropdown button as shown in this ESRI sample. I've modified it slightly but my modified version has run fine under v2.8 and v3.3: var map, initExtent, basemapGallery;
basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps: true,
map: map
});
//Manually add the USGS Topo basemap into the basemap gallery
var usgsLayer = new esri.dijit.BasemapLayer({
url: "http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"
});
var usgsBasemap = new esri.dijit.Basemap({
layers: [usgsLayer],
title: 'USGS Topoography'
});
basemapGallery.add(usgsBasemap);
// Populate the basemap gallery widget with the list of ESRI basemaps
dojo.connect(basemapGallery, 'onLoad', function () {
//add the basemaps to the menu but exclude the "Oceans" basemap
dojo.forEach(basemapGallery.basemaps, function (basemap) {
if (basemap.title != 'Oceans') {
dijit.byId("basemapMenu").addChild(new dijit.MenuItem({
label: basemap.title,
onClick: dojo.hitch(this, function () {this.basemapGallery.select(basemap.id);})
}));
}
});
});
When I just added this code into my v3.4 based app, it would throw an error during the "new esri.dijit.BasemapGallery" line of code. Under IE, it would just say "Access Denied" but Firefox returned: "Error: Permission denied for <file://> to create wrapper for object of class UnnamedClass
http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/
Line 15" I spent some time verifying that my code hadn't copy/pasted wrong and then zero'd in on the reference to "file" in the Firefox error. In the address bar of my browser, the path to the HTML was a UNC format path ala "\\dmc\appName\index.html" but the minute I changed the URL to "http:\\dmc\appName\" the basemapGallery no longer threw an error. and loaded successfully. Very strange. This did not throw an error in previous versions of the API. Steve
... View more
04-10-2013
10:37 AM
|
0
|
0
|
675
|
|
POST
|
I just started playing with routeTask and, although it works great, it can produce some unintended routes. I can't see an obvious way to do this so I'll just ask- can you specify a parameter to the route task so that any route that is calculated MUST utilize a specific street? I'm considering using the routeTask to help map road segments by specifying the starting and ending locations. The problem occurs if there's a major road that parallels the actual road I want because the calculated route will jump onto the major road instead of following the local road. In my simple tests, the route task would create the route I wanted if I was able to add another stop along the road I'm interested in and between the two end points. Thanks! Steve
... View more
04-09-2013
07:15 PM
|
0
|
3
|
1038
|
|
POST
|
I just got rid of mine. It was a bear to find in the CSS but I finally did. Here's what I had to add to my CSS file to finally eliminate it: .claro .dijitTooltipConnector { background:none !important; } [I was using the CLARO dojo style. Change that reference to whatever style you're using] Good luck! Steve
... View more
04-09-2013
02:08 PM
|
0
|
0
|
995
|
|
POST
|
It would certainly be ideal if ESRI provided a method of retrieving this information. If Ken's TOC widget suggestion doesn't work for you, there's always the option of scraping the REST service description page using AJAX and YQL. I used the code in the link above as a base in order to extract file names from an HTML version of a FTP file directory listing. I suppose you could pass the URL to the REST Service directory of the layer you're interested in (what you previously described such as this) and the process the results to extract the info you need. Not pretty- but doable. Steve
... View more
04-09-2013
07:15 AM
|
0
|
0
|
892
|
|
POST
|
They definitely still do that at the big International User Conference but I've never attended a Dev Summit so I don't know if that's available for the Dev Summit.
... View more
04-08-2013
09:38 PM
|
0
|
0
|
921
|
|
POST
|
Excellent! Thanks Derek. Looking forward to reading a few of them.
... View more
04-08-2013
03:18 PM
|
0
|
0
|
921
|
|
POST
|
A little hard to respond without knowing more about what you're doing with your OnClick event so I'll blindly offer a couple (untested) suggestions: Would it be too awkard to switch your onClick code over to a onDblClick event? That way you avoid the conflicting situation entirely. Perhaps you could add a conditional statement within your onClick event handler and check if map.OnPan has values. If it does, the map is panning so you know that you shouldn't perform your onClick code. Good luck! Steve
... View more
04-08-2013
03:10 PM
|
0
|
0
|
479
|
|
POST
|
I've gone through the entire list and all of the JS API presentations aren't available: http://proceedings.esri.com/library/userconf/devsummit13/index.html Thanks! Steve
... View more
04-08-2013
10:26 AM
|
0
|
6
|
1304
|
|
POST
|
I'm just getting my feet wet with the PrintTask functionality in v3.3 of the API. Ideally, I just wanted to take what I see on the screen, export it to a JPEG, and then insert that into a "report" that I build on the fly with JS & HTML. I'm using PrintTask and the "Export Web Map Task" from our 10.1 install of ArcGIS Server. The first attachment (screenshot01) is what I see on my screen. The second attachment (screenshot02) shows the exported JPEG as it appears in my generated report. As you can see, they only loosely resemble each other. I have two census feature layers that have dynamic labels which do not even show up in the exported JPEG (this might be a bug? I recall reading a thread recently somewhat related to this..). Next, the linework in the exported image are huge and bloated compared with what I see on screen. How do I produce an exported image that is as close to WYSIWYG as possible? Here's my relevant code for my printTask creation: pTemplate = new esri.tasks.PrintTemplate();
pTemplate.exportOptions = {
width: 600,
height: 400,
dpi: 300
};
pTemplate.format = "jpg";
pTemplate.layout = "MAP_ONLY";
pTemplate.preserveScale = false;
pTemplate.showAttribution = false;
var params = new esri.tasks.PrintParameters();
params.map = map;
params.template = pTemplate;
thePrintTask = new esri.tasks.PrintTask(url);
thePrintTask.execute(params, function(result) {
jpgMapDiv = theDocument.createElement("div");
jpgMapDiv.setAttribute("id","jpegMap");
setStyle(jpgMapDiv, {
width : '95%',
height: '400px',
marginRight : 'auto',
marginLeft : 'auto',
borderTop: '2px solid black',
padding: "10px"
});
jpgMapDiv.innerHTML = "<img src=\"" + result.url + "\" style=\"border:2px solid black;left:25%\"\>";
theDocument.body.appendChild(jpgMapDiv);
}); THANKS! Steve
... View more
04-05-2013
02:38 PM
|
0
|
6
|
1612
|
|
POST
|
I don't know how to fix your problem but I think the reason for the error is because ESRI changed the "default" info window to a popup instead of infoWindow. If you compare the methods of both in the API reference, you'll see that move() is present in infoWindow but not for popup. This change is referenced in the "What's new" document: http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/whats_new.html
... View more
03-29-2013
08:56 AM
|
0
|
0
|
597
|
|
POST
|
This thread might be some help. It seems to suggest that the syntax for retrieving a pixel value might be: idResults[0]['Pixel Value'] Haven't tried it so I'm just throwing it out there. Steve
... View more
03-19-2013
01:21 PM
|
0
|
0
|
653
|
|
POST
|
This should be pretty easy. Use a function to actually populate the content of your infoWindow. First, create your infoTemplate: var theTemplate = new esri.InfoTemplate();
theTemplate.setContent(setPopupContent); Next, set up your dojo.connect for clicks on the features in your layer: //Listener event for feature selection and the popup info widow
dojo.connect(theFeatureLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theFeatureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.setFeatures([evt.graphic]);
map.infoWindow.show(evt.mapPoint);
}); Lastly, create the function which will populate your template with the content you want: function setPopupContent(graphic) {
attr = graphic.attributes;
curState = attr.STATE;
content = 'Create your content here';
//If The state clicked is ABC, append the special notation
if (curState == "ABC") {
content = content + "<br/><br/>(estimates based on State average)";
}
return content;
} Steve
... View more
03-19-2013
09:58 AM
|
0
|
0
|
504
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-04-2025 02:30 PM | |
| 3 | 11-13-2025 07:55 AM | |
| 1 | 09-11-2025 10:18 AM | |
| 1 | 09-11-2025 08:03 AM | |
| 1 | 08-13-2025 09:16 AM |