POST
|
Like this: var fireFeature0 = new esri.layers.FeatureLayer(fireFeatureUrl0 + "?token=" + editToken, {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ['*']
}); Then I would use: map.removeLayer(fireFeature0); Of course, the Url and editToken are defined above but within the same function that is loading the layer, should they be global also maybe?
... View more
04-07-2014
09:43 PM
|
0
|
0
|
264
|
POST
|
Hello, I searched this forum and did find a vaguely similar post and tried the solution, unfortunately it did not help me though. I made sure to make the variable for the feature layer global. I have a JavaScript application in MVC and am trying to remove a feature layer using "map.removeLayer(nameOfFeatureLayerObject)" and it isn't working for me, the graphics from the layer remain on my map. I had read that there may be an issue if they are associated with an existing editor or any other widget, and they are. So, just before the .removeLayer() I have tried .destroy() on the editor and template picker dijits that the layer is being used in, and it still remains. An important note, these feature layers are brought in using a token, as they are secure. Could this have something to do with my issue? Also, this particular app is on 3.5 of the jsapi. Thanks in advance for any advice.
... View more
04-07-2014
10:26 AM
|
0
|
3
|
372
|
POST
|
Hello, I am using the locateButton dijit out of the box, and attempting to get it to work with an app that has a map with spatial reference 102696. When I hit the button, I get this in my javascript console: "Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 102696)" I am using a Geometry service from the same location as the map. Any ideas on a fix for this? Thank you in advance
... View more
01-23-2014
04:17 AM
|
0
|
1
|
673
|
POST
|
Hello, Does anyone have any good advice on how I could possibly created an additional attribute inspector, that I can show maybe with a different way? I'm using an editor widget that automatically brings up an attribute inspector with custom "fieldInfos" set, but the client would like a second way to view some attributes that will be some different ready-only fields of the same features, that should not appear in the first attribute inspector. I would like to set up a second attribute inspector for this, but I'm not sure how I would go about it, or activate it by clicking on the same feature. Thank you in advance for any advice or ideas.
... View more
01-12-2014
11:15 AM
|
0
|
0
|
375
|
POST
|
Hello, I am working on an app, using version 3.5 of the jsapi, that has a few layers including one service layer that is secure and requires a name and password to access. I have no problem adding this layer to the map itself using code to add a token at the end of the service url, but the same method isn't working for adding it to the legend widget. I have tried to change up the order of things, Tried to call the widget in the "onLoad" event Tried to call it in a button click event, to make sure the map had its other layers loaded first Attempting to add the secure layer to the widget results in getting challenged for the name and password not once, but for every index in the service. before it tries to create the legend. I've tried adding the legend without the token, and adding it to the LayerInfo array AFTER the tokened version has been added to the map, it doesn't seem to matter, I get no legend for it. Does anyone have any advice for this?
... View more
01-03-2014
01:31 PM
|
0
|
2
|
368
|
POST
|
In my experience with the Attribute Inspector, although you can add a save button, when a user hits enter in a textbox after changing data, or clicks off of the infowindow, the save is automatic.
... View more
10-10-2013
12:08 PM
|
0
|
0
|
249
|
POST
|
jvalencia, Thank you for the response, after seeing your screenshot I tried it again on all my browsers on this computer.. no luck. So I tested it on another computer and it works as intended. Clearly something is up with some type of video rendering on my development computer I was attempting at first, Thanks!
... View more
07-17-2013
05:31 AM
|
0
|
0
|
333
|
POST
|
I use this and like it rather well: https://code.google.com/p/dynatree/
... View more
07-16-2013
10:30 AM
|
0
|
0
|
234
|
POST
|
Hello, Maybe I am doing something totally wrong, but as this sample URL: http://developers.arcgis.com/en/javascript/samples/ed_simpletoolbar/ I cannot seem to do anything except draw red lines regardless of which shape I select, or which option on the small toolbar I have selected. Can anyone verify if this sample works as intended? It's definitely possible I'm just not using it correctly, its a bit confusing. The sample has some pre-loaded shapes, I assumed those were editable but can't seem to select them.
... View more
07-16-2013
09:48 AM
|
0
|
3
|
857
|
POST
|
I don't know if it should matter or not, but I was surprised to see version 1.2 of the JSAPI being used in those samples. Are you using the latest? I also got the same issues you did, using IE 10.
... View more
07-16-2013
09:07 AM
|
0
|
0
|
265
|
POST
|
How would you click the button without dragging your last polyline off of the drawing area?
... View more
04-03-2013
10:17 AM
|
0
|
0
|
273
|
POST
|
hzhu's example worked wonderfully for Google's V2 API, the code however has changed from Google for V3. Does anyone have an updated example of hzhu's code that would work with V3 possibly?
... View more
03-18-2013
08:41 AM
|
0
|
0
|
722
|
POST
|
When I've had this issue, I have made sure to set an image parameter to PNG 32 on the layer that I need transparencies on: var imgParams = new esri.layers.ImageParameters();
imgParams.format = "PNG32";
var exampleLayer = new esri.layers.ArcGISTiledMapServiceLayer(
"http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer",
{ id: testLayerID, imageParameters: imgParams, visible: true });
... View more
02-28-2013
08:44 AM
|
0
|
0
|
267
|
POST
|
I'm working on a project where I had a similar issue. Print widget really just wasn't doing it for me. We did two things to fix. 1. Made sure that we changed the URL configuration on ArcGIS server to read from the public website URL rather than the machine name, since the print service was on the same server as the layers we were trying to display. 2. Went with PrintTask rather than the widget, i.e.: dojo.require("esri.tasks.PrintTask");
printBaseMap = function () {
var printTask, params;
printTask = new esri.tasks.PrintTask("http://yourserver.com/arcgis/rest/services/LetterPortrait/GPServer/Export%20Web%20Map");
var ptemplate = new esri.tasks.PrintTemplate();
ptemplate.layout = "Letter ANSI A Landscape";
ptemplate.format = "PNG32";
ptemplate.layoutOptions = {
"authorText": "your author text",
"copyrightText": "© " + (new Date).getFullYear(),
"legendLayers": [],
"titleText": "your title text",
"scalebarUnit": "Miles"
};
// use the extent of the webmap in the output image
ptemplate.preserveScale = false;
ptemplate.showAttribution = false;
params = new esri.tasks.PrintParameters();
params.map = yourMap;
params.template = ptemplate;
printTask.execute(params, printComplete, printError);
}
printComplete = function (result) {
window.open(result.url + "?k=" + new Date().getTime());
}
printError = function (error) {
alert(error);
}
... View more
02-27-2013
07:38 AM
|
0
|
0
|
749
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|