|
POST
|
Try using dijit/registry to get a reference to those items in the Dialog widget. Take a look at the documentation on using registry.
... View more
03-18-2014
04:45 AM
|
0
|
0
|
1207
|
|
POST
|
At the "ArcGIS API for JavaScript: What Have You Done for Me Lately?" session at this year's Developer Summit, Jerome Yang presented a script that styles features with specific attributes using CSS. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>CSS</title>
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
margin: 0;
}
#legend {
position: absolute;
right: 0;
top: 0;
width: 120px;
background-color: #fff;
padding: 5px;
margin: 10px;
border-radius: 5px;
}
path[data-name="Washington"] {
stroke: rgb(54, 93, 141);
stroke-width: 1pt;
stroke-opacity: 1;
fill: rgb(54, 93, 141);
fill-opacity: 0.7;
}
path[data-name="Jefferson"] {
stroke: rgb(160, 63, 60);
stroke-width: 1pt;
stroke-opacity: 1;
fill: rgb(160, 63, 60);
fill-opacity: 0.7;
}
path[data-name="Franklin"] {
stroke: rgb(115, 140, 61);
stroke-width: 1pt;
stroke-opacity: 1;
fill: rgb(115, 140, 61);
fill-opacity: 0.7;
}
path:not([data-name="Washington"]):not([data-name="Jefferson"]):not([data-name="Franklin"]) {
stroke: rgb(0, 0, 0);
stroke-width: 0.4pt;
stroke-opacity: 0.5;
fill: rgb(255, 255, 255);
fill-opacity: 0;
}
</style>
<script src="//js.arcgis.com/3.8/"></script>
<script>
require(["esri/map", "esri/layers/FeatureLayer", "dojo/domReady!"], function(Map, FeatureLayer) {
var map = new Map("map", {
basemap: "oceans",
center: [-98.5795,39.828175],
zoom: 5
});
var layer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/3", {
styling: false,
dataAttributes: [ "name" ]
});
map.addLayer(layer);
});
</script>
</head>
<body>
<div id="map"></div>
<div id="legend">
<div align="center"><b>Most Common County Names in the US</b></div>
<hr>
<div>
<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path data-name="Washington" d="M 1 1 L 11 1 L 11 11 L 1 11 Z" />
</svg>
<span>Washington (31)</span>
</div>
<div>
<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path data-name="Jefferson" d="M 1 1 L 11 1 L 11 11 L 1 11 Z" />
</svg>
<span>Jefferson (27)</span>
</div>
<div>
<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path data-name="Franklin" d="M 1 1 L 11 1 L 11 11 L 1 11 Z" />
</svg>
<span>Franklin (25)</span>
</div>
<div>
<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path data-name="Other" d="M 1 1 L 11 1 L 11 11 L 1 11 Z" />
</svg>
<span>Other</span>
</div>
</div>
</body>
</html>
... View more
03-13-2014
09:00 AM
|
0
|
0
|
2692
|
|
POST
|
William, you should mark your post as the answer to help those who are searching for a solution to this question.
... View more
03-13-2014
07:56 AM
|
0
|
0
|
1442
|
|
POST
|
I have a grid showing over 2000 records, built using this code
var data = arrayUtils.map(results.features, function (feature) {
return lang.clone(feature.attributes);
});
var memStore = new Memory({ data: data, idProperty: "OBJECTID" });
var diveGrid = new (declare([Grid, Selection, DijitRegistry, ColumnHider]))({
id: "diveGrid",
bufferRows: Infinity,
columns: parameters.diveQueryDgridColumns,
selectionMode: "single",
store: memStore
});
... View more
03-13-2014
07:54 AM
|
0
|
0
|
1274
|
|
POST
|
Are you setting the idProperty of the store? See this thread.
... View more
03-12-2014
02:00 PM
|
0
|
0
|
1274
|
|
POST
|
However, currently I don't think the code assist will work with AMD. This is noted in the code assist page. Note: these plug-ins do not yet support code that loads JS API modules using AMD due to the nature of how modules are aliased once loaded.
... View more
03-12-2014
10:56 AM
|
0
|
0
|
1343
|
|
POST
|
Have you seen the latest version of the TOC Widget? This has some additional options that let you collapse layers.
... View more
03-12-2014
10:53 AM
|
0
|
0
|
422
|
|
POST
|
A single point essentially does not have an extent. Take a look at this thread which shows how to zoom to a single point.
... View more
03-11-2014
02:56 PM
|
0
|
0
|
1442
|
|
POST
|
It's just an empty canvas
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="410" height="240">
</mx:Canvas>
... View more
03-06-2014
08:15 AM
|
0
|
0
|
1277
|
|
POST
|
I'm suggesting you try that as a test to see if you're having an issue setting the map extent.
... View more
03-06-2014
06:30 AM
|
0
|
0
|
1835
|
|
POST
|
This could be an issue of setting the extent of a tiled map. Since the tiled map will only show at specific zoom levels, the extent that you explicitly set may not be the same extent as the map's zoom level will allow. Have you tried setting the extent using only a dynamic service (and no basemap)?
... View more
03-06-2014
06:12 AM
|
0
|
0
|
1835
|
|
POST
|
Can you post your code or a working sample at JSBin that shows the problem?
... View more
03-06-2014
03:48 AM
|
0
|
0
|
1964
|
|
POST
|
That code works properly in this JSBin. What are your issues?
... View more
03-06-2014
03:43 AM
|
0
|
0
|
7367
|
|
POST
|
"Sleepy" services have been complained about for a while. Search for the word "sleepy" to see if any of the threads help.
... View more
03-06-2014
03:38 AM
|
0
|
0
|
970
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | a week ago | |
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|