Tag Info

Hot answers tagged

5

Checkout the utility functions in the esri.geometry namespace. You can do areas and lengths client side with functions from there. You can also do point-in-polygon client side with polygon.contains (also see extent.contains).


5

As far as I know, there's two problems in this code. First one is, both Query and QueryTask doesn't define outputSpatialreference parameters. So this query returns there own spatialreference geometries instead of map's spatialreference. tasks.Query... queryContentSelect.outSpatialReference = map.spatialReference; tasks.QueryTask... ...


4

The only solution pure javascript solution I've found so far (and I did not try) is https://github.com/thejefflarson/wkb.js. It's only an incomplete WKB parser (it converts WKB to a js object you can transform to WKT) An alternative way to wkb on javascript side can be the experimental twkb (not a standard at the moment) ...


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

Have a look at the OpenLayers Cluster Strategy and related examples: Cluster Strategy Example Cluster Strategy Threshold Example Extended clustering example Here's a good tutorial you might be interested in: Customized OpenLayers cluster strategies


2

The symbol for your polygon from your query task is not valid. While it still works within the API, the print task is less tolerant. Change this: // Executes after the query ahs been completed dojo.connect(queryTask, "onComplete", function (results) { //QueryTask returns a featureSet. Loop through features in the featureSet avd add them to the map. ...


2

It can't work because you have : Ext 4.2.0 Openlayers 2.12 GeoExt 1.1 and if you carefully read http://geoext.org/tutorials/quickstart.html#getting-geoext you have Download the latest Ext 3.x from the ExtJS website Furthermore, read http://blog.opengeo.org/tag/extjs4/ to confirm


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

You can do it with features on a vector layer. Provide a datasource that has features on the same coordinates than your features on the raster layer. Then you can access the attributes of these features. For example, population: myvectorlayer.features[myfeatureindex].attributes.population = 10000; (or use one of the myvectorlayer.getFeature* functions) ...


1

Another possibility might be to use TopoJSON instead of plain GeoJSON: TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs. TopoJSON eliminates redundancy, offering much more compact representations of ...


1

Your main task is to upload the user given shapefile into your server and append it to your SDE Geodatabase. I'm not sure if actually showing the features to your user on the web map is an actual requirement, so I'll give you two ways of doing this. If You need to show the geometries on the map, then there are two main parts to your User Case: Upload ...


1

Did you try the feature's move(x,y) method? You can attach a callback on your control's click event, that calls a function like this: moveAllFeatures = function(layer,x,y){ var all = layer.features.length; for(var i = 0;i<all;i++){ layer.features[i].geometry.move(x,y); } layer.redraw(); } OpenLayers geometry move


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++) { ...


1

I have used similar functionality in my map. -Created doIdentify() function and called on click event. function doIdentify(evt) { app.map.centerAndZoom(evt.mapPoint,6); } You can check sample code at JSFiddle. Please let us know if you get any error message.



Only top voted, non community-wiki answers of a minimum length are eligible