Hot answers tagged javascript
3
Javascript location [Current as 13/05/2013]
http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/
For the proxy settings
note the code:
esri.config.defaults.io.alwaysUseProxy = true;
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.BorderContainer");
...
2
The Id editor is basically calling the OpenStreetMap API, and requesting the data in osm's xml format.
It basically makes a request like: http://www.openstreetmap.org/api/0.6/map?bbox=xmin,ymin,xmax,yamx
Once the data is received by the client, it is rendered using the connection.loadTiles function in id.js. The deployment code is hard to read, but you ...
1
Why do you think, you can't style a layer based on attributes? It is very much possible.
There are several ways including:
You can use uniqueValueRules, like shown in this sample: Unique Value Styles Example
You could use Context of a style, like given in this sample: Feature Styles Example
You could create a SLD and apply it to your layer, like given in ...
1
You need to add a vector layer, and then add a feature to it. See the following code:
var startPt=new OpenLayers.Geometry.Point( 2, 45);
var endPt=new OpenLayers.Geometry.Point(7,55);
//make the line:
var line=new OpenLayers.Geometry.LineString([startPt, endPt]);
//style
var style={strokeColor:"#0500bd", strokeWidth:3};
//make vector
var fea=new ...
1
Have you looked at the reorder function on the map object?
Suppose your map already has 2 layers, and you want to add a new layer in between them, you could use the following code:
var LouisvilleLayer=new esri.layers.ArcGISDynamicMapServiceLayer(
...
1
Someting like this should do what you want, but please note that the random points here are all integers
(function () {
function getRandomArbitary (min, max) {
return Math.random() * (max - min) + min;
}
function featureIntersects (features, feature) {
for (var i = 0; i<features.length; i++) {
...
Only top voted, non community-wiki answers of a minimum length are eligible
