POST
|
You probably clicked on one of the namespaces that does not have the source code; for example, any of the com.esri.ags... classes' source code is not available. This is the internal source code for the ArcGIS API for Flex. You can see from the error message that Flash Builder tried to find the source code in the .swc file. Here's more information about the SWC file: "SWC files make it easy to exchange components and other assets among Flex developers. You need only exchange a single file, rather than the MXML or ActionScript files and images and other resource files. The SWF file in a SWC file is compiled, which means that the code is loaded efficiently and it is hidden from casual view. Also, compiling a component as a SWC file can make namespace allocation an easier process." http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_30.html The ctrl + left click does work if you click on the "import com.esri.viewer.utils.PopUpInfoParser".
... View more
05-11-2012
02:52 PM
|
0
|
0
|
163
|
POST
|
Got a few questions for you 1. How do you know that it's a memory issue? 2. Is your RAM usage getting higher every time you add/remove a map layer? 3. Is ArcGIS Server and the Flex application on the same machine? 4. If so, can you reproduce the problem if the Flex application is on a different machine? 5. Have you also tried testing ArcGIS Server and the Flex application on a different machine? If you can't reproduce the problem using different machines then more than likely the problem isn't with the API so then I would check your web server logs.
... View more
05-11-2012
02:40 PM
|
0
|
0
|
206
|
POST
|
That worked for me. Here's what I'm using for the operationallayer element: <operationallayers> <layer label="Rooftop" type="dynamic" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_1990-2000_Population_Change/MapServer" /> <layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/> </operationallayers> Try replacing your operationallayer tag with the one above and see if it works for you. Also, what version of the ArcGIS Viewer for Flex are you using? And are you referring to the "LayerList" widget when you mentioned clicking on the "More..." popup?
... View more
05-11-2012
02:27 PM
|
0
|
0
|
126
|
POST
|
There's a problem with the code in the sample. Specifically this line below: return "<input type='checkbox' class='list_item' checked='" + (info.defaultVisibility ? "checked" : "") + "' id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>"; Using checked='' is the same as using checked='checked'. I corrected the code. Here's the correct code for the line: return "<input type='checkbox' class='list_item' " + (info.defaultVisibility ? " checked='checked'" : "") + " id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>"; Here's the full code. If this still doesn't work for you then try using a MXD rather than MSD. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" /> <title>Dynamically Create Map Service Layer List</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8"></script> <script type="text/javascript"> dojo.require("esri.map"); var layer, map, visible = []; function init() { map = new esri.Map("map"); layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://le/ArcGIS/rest/services/USA/MapServer"); if (layer.loaded) { buildLayerList(layer); } else { dojo.connect(layer, "onLoad", buildLayerList); } } function buildLayerList(layer) { var items = dojo.map(layer.layerInfos, function (info, index) { if (info.defaultVisibility) { visible.push(info.id); } var inputString = "<input type='checkbox' class='list_item' " + (info.defaultVisibility ? " checked='checked'" : "") + " id='" + info.id + "' onclick='updateLayerVisibility();' /><label for='" + info.id + "'>" + info.name + "</label>"; return inputString; }); dojo.byId("layer_list").innerHTML = items.join(); layer.setVisibleLayers(visible); map.addLayer(layer); } function updateLayerVisibility() { var inputs = dojo.query(".list_item"), input; visible = []; dojo.forEach(inputs, function (input) { if (input.checked) { visible.push(input.id); } }); //if there aren't any layers visible set the array to be -1 if (visible.length === 0) { visible.push(-1); } layer.setVisibleLayers(visible); } dojo.addOnLoad(init); </script> </head> <body> This sample loads an ArcGISDynamicMapServiceLayer.<br /> It determines the layers in the map service and presents them as checkboxes that can be used to toggle their visibility.<br /> <br /> Layer List : <span id="layer_list"></span> <br /> <br /> <div id="map" class="claro" style="width: 600px; height: 400px; border: 1px solid #000;"> </div> </body> </html>
... View more
05-11-2012
02:01 PM
|
0
|
0
|
370
|
POST
|
Have you tried setting Windows Authentication only for the map services and use Forms authentication only for your application? You should be able to choose which authentication method is used for every application in IIS.
... View more
05-11-2012
01:35 PM
|
0
|
0
|
211
|
POST
|
If you want to use multiple features as the geometry for an identify task, I would send them off to a geometry service's union operation and use the result of that as your identifyParameters.geometry parameter. This is an even better idea!
... View more
05-11-2012
01:32 PM
|
0
|
0
|
261
|
POST
|
You can do this by calling multiple IdentifyTasks. Here's one workflow you may follow: 1. Create an IdentifyTask that performs the identify for one geometry 2. After the results are returned, store the results in a global variable 3. Within the same result event, call the second IdentifyTask 4. In the results for the second IdentifyTask, store the results into the same global variable as the first IdentifyTask 5. Repeat this as many times as you want Once you've completed all the IdentifyTasks, loop through all the results in the global variable. You should now have all the results from all the IdentifyTasks that you ran. Hope this helps!
... View more
05-11-2012
01:15 PM
|
0
|
0
|
261
|
POST
|
I must be doing something wrong in the code. I can't seem to reproduce the same issue you are seeing. I modified the sample code and added the following map.infoWindow.resize(400, 300); map.infoWindow.setTitle('asdf<div>thang</div>'); map.infoWindow.setContent('<div id="infoWindowContents"></div>'); content = '<p>example of html formatted content</p>'; dojo.byId('infoWindowContents').innerHTML = content; I can't seem to get my code to replace the infoWindow though. What version of the JavaScript API are you using? Here's my full code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9" />
<title>Default Editor </title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css">
<script type="text/javascript">
dojoConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8">
</script>
<style type="text/css">
html, body
{
height: 100%;
width: 100%;
margin: 0;
}
body
{
background-color: #fff;
overflow: hidden;
font-family: Helvetica;
}
#templatePickerPane
{
width: 225px;
overflow: hidden;
}
#panelHeader
{
background-color: #92A661;
border-bottom: solid 1px #92A860;
color: #FFF;
font-size: 18px;
height: 24px;
line-height: 22px;
margin: 0;
overflow: hidden;
padding: 10px 10px 10px 10px;
}
#map
{
margin-right: 5px;
padding: 0;
}
.esriEditor .templatePicker
{
padding-bottom: 5px;
padding-top: 5px;
height: 500px;
border-radius: 0px 0px 4px 4px;
border: solid 1px #92A661;
}
.dj_ie .infowindow .window .top .right .user .content, .dj_ie .simpleInfoWindow .content
{
position: relative;
}
</style>
<script type="text/javascript">
dojo.require("esri.dijit.editing.Editor-all");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.SnappingManager");
var map;
function init() {
//snapping is enabled for this sample - change the tooltip to reflect this
esri.bundle.toolbars.draw.start = esri.bundle.toolbars.draw.start + "<br/>Press <b>CTRL</b> to enable snapping";
esri.bundle.toolbars.draw.addPoint = esri.bundle.toolbars.draw.addPoint + "<br/>Press <b>CTRL</b> to enable snapping";
//This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to
//replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic
//for details on setting up a proxy page.
esri.config.defaults.io.proxyUrl = "http://le/proxy/net/silverlight/proxy.ashx";
//This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications
esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
var extent = new esri.geometry.Extent({
"xmin": -8576501,
"ymin": 4705377,
"xmax": -8574612,
"ymax": 4706867,
"spatialReference": {
"wkid": 102100
}
});
map = new esri.Map("map", {
extent: extent
});
dojo.connect(map, "onLoad", function () {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
dojo.connect(map, "onLayersAddResult", initEditing);
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
var operationsPointLayer = new esri.layers.FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
var operationsLineLayer = new esri.layers.FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/1", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
var operationsPolygonLayer = new esri.layers.FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
map.addLayers([operationsPointLayer, operationsPolygonLayer, operationsLineLayer]);
map.infoWindow.resize(400, 300);
map.infoWindow.setTitle('asdf<div>thang</div>');
map.infoWindow.setContent('<div id="infoWindowContents"></div>');
content = '<p>example of html formatted content</p>';
dojo.byId('infoWindowContents').innerHTML = content;
}
function initEditing(results) {
var featureLayerInfos = dojo.map(results, function (result) {
return {
'featureLayer': result.layer
};
});
var settings = {
map: map,
layerInfos: featureLayerInfos
};
var params = {
settings: settings
};
var editorWidget = new esri.dijit.editing.Editor(params, 'editorDiv');
var options = { snapKey: dojo.keys.copyKey };
map.enableSnapping(options);
editorWidget.startup();
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false"
style="width: 100%; height: 100%;">
<div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
</div>
<div data-dojo-type="dijit.layout.ContentPane" id="templatePickerPane" data-dojo-props="region:'left'">
<div id="panelHeader">
Default Editor
</div>
<div style="padding: 10px;" id="editorDiv">
</div>
</div>
</div>
</body>
</html>
... View more
04-24-2012
02:30 PM
|
0
|
0
|
545
|
POST
|
Let me see if I understand the problem correctly. You are using the ed_default_editingwidget sample and would like to make use of 2 infoWindows. Is that correct? If so, why do you want to use 2 infoWindows? Are you going to display 2 infoWindows at once when a user clicks on a feature?
... View more
04-24-2012
12:44 PM
|
0
|
0
|
545
|
POST
|
Gunjan, Here's the sample code that works for me. I also sent this to Sumi. I attached my Addin solution. Let me know if this helps.
... View more
03-19-2012
03:58 PM
|
0
|
0
|
162
|
POST
|
oh also... can you reproduce the issue on multiple machines or does it happen only on one?
... View more
03-16-2012
09:28 AM
|
0
|
0
|
214
|
POST
|
Do you know if this only happens with your map service or can you reproduce it using Esri's map services hosted on arcgis.com? Do notice anything different about how the application loads when the problem occurs? - Does it load slower? - What browser are you using?
... View more
03-16-2012
09:14 AM
|
0
|
0
|
214
|
POST
|
I can't reproduce the problem. Here's my code. Click on Add Point and then hover or click on the point. [HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>Shapes and Symbols</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.4/js/dojo/dijit/themes/tundra/tundra.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"></script> <script type="text/javascript"> dojo.require("esri.map"); dojo.require("esri.layers.agstiled"); var map, tb; function init() { map = new esri.Map("map"); map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer")); } function mouseOver() { document.getElementById("mouseEvent").value = "MouseOver"; } function mouseClick() { document.getElementById("mouseEvent").value = "onClick"; } function addPoint() { var symbol = new esri.symbol.SimpleMarkerSymbol(); //new esri.symbol.TextSymbol("Hello \n\r World"); var i = 0; var negative = true; var graphicsLayer = new esri.layers.GraphicsLayer(); var x = -50; var y = 32; var geometry = new esri.geometry.Point(x, y, new esri.SpatialReference({ wkid: 4326 })); graphicsLayer.add(new esri.Graphic(geometry, symbol)); map.graphics.add(new esri.Graphic(geometry, symbol)); dojo.connect(map.graphics, "onMouseOver", mouseOver); dojo.connect(map.graphics, "onClick", mouseClick); } dojo.addOnLoad(init); function recenter() { var center = map.extent.getCenter(); document.getElementById("map").style.width = "1000px"; var resizeTimer; resizeTimer = setTimeout(function () { map.resize(); map.reposition(); }, 0); map.centerAt(center); } function clearGraphics() { var layerArray = map.graphicsLayerIds; for (i = 0; i < layerArray.length; i++) { var layer = map.getLayer(map.graphicsLayerIds); layer.clear(); } } </script> </head> <body class="tundra"> <button onclick="addPoint()"> Point</button> <button onclick="recenter()"> Recenter</button> <button onclick="clearGraphics()"> Clear</button> <div id="map" style="width: 500px; height: 500px; border: 2px solid #000;" class="tundra"> </div> <input type="text" id="mouseEvent" /> </body> </html> [/HTML]
... View more
03-16-2012
09:10 AM
|
0
|
0
|
581
|
POST
|
There's a known bug related to the JavaScript API's TextSymbol: [#NIM048090 Javascript TextSymbol Text property not honoring new line and carriage return characters in the text. ] My suggestion is to go on http://ideas.arcgis.com and put an idea on the site to or vote for the idea if it already exists. The only work around I can come up with is to use 2 TextSymbols. I was also able to get IE9 to work but I needed to use IE7 standards.
... View more
03-16-2012
08:50 AM
|
0
|
0
|
249
|
POST
|
Are you able to constantly reproduce the problem or does it happen randomly?
... View more
03-13-2012
02:17 PM
|
0
|
0
|
511
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|