|
POST
|
I use this on featureLayers but it basically adjusts the transparency option for the layer. It uses the dijit.form.HorizontalSlider. The HTML I have is: <p style="font-size:140%;margin-left: 10px">Use this slider to adjust the transparency of the Demographic Data Overlays:</p>
<div id="theOpacitySlider" dojoType="dijit.form.HorizontalSlider" name="horizontal1"
onChange="applyOpacity"
value="40"
maximum="100"
minimum="0"
discreteValues="11"
pageIncrement="100"
showButtons="false"
intermediateChanges="false"
slideDuration="500"
style="width:290px; height: 20px;margin-left:auto;margin-right:auto"
id="slider1">
<ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration" style="height:1.2em;font-size:90%;font-weight:bold" count="6" numericMargin="0"></ol>
<div dojoType="dijit.form.HorizontalRule" container="topDecoration" count=11 style="height:5px;"></div>
<div id = "theOpacityRuler" dojoType="dijit.form.HorizontalRule" container="bottomDecoration" count=2 style="height:10px;"></div>
<ol dojoType="dijit.form.HorizontalRuleLabels" container="bottomDecoration" style="height:1em;font-size:90%;font-style:italic">
<li>Solid</li>
<li>Transparent</li>
</ol>
</div><br />
<table>
<tr>
<td><SPAN style="font-weight:bold">Current Transparency Setting: <input readonly id="sliderInput" size="2" value="40%" style="padding-left:5px"></SPAN></td>
</tr>
</table>
The javascript code is: function applyOpacity() {
var theAmount;
theAmount = arguments[0];
theOpacity = 1 - (theAmount / 100);
map.getLayer('your Layer ID here').setOpacity(theOpacity);
} Be sure to also include the necessary dojo.requires: dojo.require("dijit.form.HorizontalSlider");
dojo.require("dijit.form.HorizontalRuleLabels");
dojo.require("dijit.form.HorizontalRule"); I also included a screenshot to give you an idea of what it looks like. Good luck! Steve
... View more
07-15-2013
09:06 AM
|
0
|
0
|
1278
|
|
POST
|
In your second code block, simbolo1, simbolo2, and simbolo0 are actually text strings and not symbol objects. Try this instead: var array = new Array();
array[1] = simbolo1;
array[2] = simbolo2;
array[3] = simbolo0;
for (var indice in array) {
renderer.addValue(parseFloat(indice), array[indice]);
}
... View more
07-05-2013
06:57 AM
|
0
|
0
|
514
|
|
POST
|
A guess but verify that the actual SHAPE attribute field is turned on in the one layer that's not returning features. In Arcmap, Layer Properties -> Fields and then make sure the checkbox next to the Shape field is checked.
... View more
07-03-2013
11:24 AM
|
0
|
0
|
699
|
|
POST
|
I'll echo Brittney's suggestion. This is basically what I do, although I fire off my code to display my splash screen in dojo.Ready(). I like using a JQuery modal dialog since they look nicer than Dojo's offerings. The result is something like the attached screenshot.
... View more
07-01-2013
12:19 PM
|
0
|
0
|
2543
|
|
POST
|
Set your height to 100% as desired but also add overflow: hidden to the CSS properties of #mapDiv. That should prevent the scrollbar from appearing.
... View more
06-18-2013
06:55 AM
|
0
|
0
|
1670
|
|
POST
|
Wow. +100 internets to you, Ryan for this. So much better than the default panning behavior. I also need to support pre IE-9 so I'll wait on the sidelines until you get that bug worked out. Great job!
... View more
06-03-2013
08:04 AM
|
0
|
0
|
2293
|
|
POST
|
You can't modify what ESRI provides straight out of the box because the leaders are actually portions of images (called sprites) which are extracted from a larger mosaic of images. That being said, if you are a masochist, I think you could accomplish this but you would have to put in some serious time creating all new sprites and tweaking the associated CSS so that it all works well. For that, I think someone from ESRI would have to chime in with some pointers. This is the actual image from the v3.3 API which all the leaders are extracted. Perhaps this could be an enhancement request for a second set of longer leaders for the infoWindows which would be enabled as an option parameter when creating the map (leaderType: normal / extended)? Steve
... View more
06-03-2013
07:28 AM
|
0
|
0
|
1318
|
|
POST
|
If you want the documentation as it was at version 3.2, you'll have to download the v3.2 SDK at this link.
... View more
05-24-2013
03:32 PM
|
0
|
0
|
943
|
|
POST
|
Ok, two things- For some reason, the map graphics layer has a feature with a 0,0 coordinate extent so that's why the zeros show up in your popup. I inserted this line of code into yours just before you add your points to the map graphics and the zero dimension graphic was removed: map.graphics.clear(); map.graphics.add(graphic); map.graphics.add(graphic2); I only found this by using a DOM element inspection tool and looked at the map.graphics.graphics object and saw that it had three items in it instead of the two that you would expect. The second thing, and I don't know if this is really critical or not, was that your coordinate pairs were missing the spatial projection so I added it like this: var point = new esri.geometry.Point(-73.986268, 40.735812,new esri.SpatialReference({ wkid: 4326 })); var point2 = new esri.geometry.Point(-77.03756, 38.907332,new esri.SpatialReference({ wkid: 4326 }));
... View more
05-23-2013
12:05 PM
|
0
|
0
|
3284
|
|
POST
|
Use esri.graphicsExtent and pass it the array of graphics.
... View more
05-23-2013
09:20 AM
|
0
|
0
|
3284
|
|
POST
|
I know with Android and iOS devices, there are ways to tether your device and use a desktop machine to watch your code and debug it like you would normally do with Firebug, etc. On the Windows Mobile side, however, the pool of information shrinks. I did find this link so maybe that will help? Good luck! Steve
... View more
05-17-2013
09:49 AM
|
0
|
0
|
622
|
|
POST
|
I believe you can do this by creating an MXD in Arcmap that gets placed onto your ArcGIS Server and is referenced as a print template by your JS API application. Unfortunately, documentation about printing is pretty sparse so you'll have to search the forums about print templates (I haven't done this yet, myself). Steve
... View more
05-13-2013
09:43 AM
|
0
|
0
|
846
|
|
POST
|
IE is the exception to every rule in web development. 😄 Without seeing it, things you could try- Setting the width of your tabContainer to 98% (and adding 'margin: 0 auto' or 'margin-left:auto;margin-right:auto' to center it in your contentPane) In conjunction with a fixed with on your tabContainer, add a fixed width to your contentPane and see what happens Steve
... View more
05-10-2013
09:44 AM
|
0
|
0
|
845
|
|
POST
|
I'm now getting at token required error: Error: Token Required [url:http://gismaps.carlsbadca.gov/arcgis/rest/services/publicAGS/trafficStatus/MapServer/1] What I was originally suggesting was to take the map resizing that happens with div widths of 100% out of the equation. With a smaller div that fits within the browser body should return the exact same map extent, regardless of browser. That being said, when I looked at the site in Firefox and IE-10, I saw the same map extent in both (which shoots a hole in my theory a little). And how did you get v3.5 of the JS API??? :confused:
... View more
05-09-2013
09:06 AM
|
0
|
0
|
4700
|
|
POST
|
I'm going to suggest that this is due to the fact that your map div is set to 100% widths and that while your monitor may be the same resolution, the available page area is differing between the two browsers. Maybe that extra difference is enough to change zoom levels? What happens if you set a defined div width, say 800x600?
... View more
05-09-2013
07:01 AM
|
0
|
0
|
4700
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | Thursday | |
| 2 | 05-21-2026 01:51 PM | |
| 1 | 03-12-2026 01:43 PM | |
| 1 | 03-12-2026 08:41 AM | |
| 2 | 03-10-2026 10:10 AM |