POST
|
hi, i saw examples of resizable polygons.but what my requirement is drawing a polygon as well as reshaping it through edges and corners.Is there any provision for that
... View more
06-20-2017
05:54 AM
|
0
|
1
|
441
|
POST
|
Really sorry that was issue in network. radius:1927212.6012732424 The above radius i got when executed that code. But is this valid value,i doubt that?
... View more
06-14-2017
06:46 AM
|
0
|
0
|
422
|
POST
|
When i try to add esri/geometry/geometryEngine under require in the which i posted before ,it is giving me error saying Uncaught ReferenceError: require is not defined Can i get your help on this?
... View more
06-14-2017
06:07 AM
|
0
|
1
|
422
|
POST
|
Thank you this was really useful. one more clarification. I saw the below format in tutorial: distance(geometry1, geometry2, distanceUnit) geometry.getPoint(0,0) Object {type: "point", x: -15849192.693999259, y: 10478016.378614787, spatialReference: Object} geometry.getCentroid() Object {type: "point", x: -18090547.842482734, y: 10478016.37861477, spatialReference: Object} How can i proceed with distance function.Sorry i am new to esri map? Can you please clarify this too?
... View more
06-14-2017
05:54 AM
|
0
|
1
|
422
|
POST
|
Thanks for your reply, I am new to arcgis api,Could you please tell me how can i get Geometry Service.Is this any paid service? If not how it is used for finding distance?
... View more
06-14-2017
05:37 AM
|
0
|
1
|
659
|
POST
|
I want to find radius of circle,i got x min and x max, My logic is to find difference and divide that by two to get radius? Can i know how to find distance between to coordinates?
... View more
06-14-2017
03:02 AM
|
0
|
5
|
1842
|
POST
|
Sorry i didnt get you.The code below is used for drawing circle and polygon.From this how can we get the radius of the circle which we draw. require([ "esri/map", "esri/toolbars/draw", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/geometry/webMercatorUtils", "esri/symbols/CartographicLineSymbol", "esri/graphic", "esri/Color", "dojo/dom", "dojo/on", "dojo/domReady!" ], function( Map, Draw, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, WebMercatorUtils, CartographicLineSymbol, Graphic, Color, dom, on ) { var circleArray = []; map = new Map("mapDiv", { basemap: "streets", center: [-148.6234374999831, 62.10143229517362], zoom: 3 }); map.on("load", initToolbar); // fill symbol used for extent, polygon and freehand polygon, use a picture fill symbol // the images folder contains additional fill images, other options: sand.png, swamp.png or stiple.png var fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25]) ); function initToolbar() { tb = new Draw(map); tb.on("draw-end", addGraphic); // event delegation so a click handler is not // needed for each individual button on(dom.byId("info"), "click", function(evt) { if (evt.target.id === "info") { return; } var tool = evt.target.id.toLowerCase(); map.disableMapNavigation(); tb.activate(tool); }); } function postGraphic(geometry) { $("#vertices").text(""); if (geometry.type === 'polygon') { //Our polygons should have only one ring var polygon = geometry.rings[0]; var vertices = ""; var latLong = []; for (var i = 0; i < polygon.length; i++) { if (geometry.spatialReference.isWebMercator()) { //Convert to traditional decimal degrees longLat = WebMercatorUtils.xyToLngLat(polygon[0], polygon[1]); } else longLat = [polygon[0], polygon[1]]; x = longLat[0]; y = longLat[1]; var objLatLong = {}; objLatLong.long = longLat[0]; objLatLong.lat = longLat[1]; latLong.push(objLatLong) //Convert the vertices to the format x,y;x,y; vertices = vertices + x + ',' + y + ';'; } $("#vertices").text(vertices); } } var circleFlag = false; var polygonFlag = false; $('#Circle').on("click", function() { circleFlag = true; polygonFlag = false; }) ; $('#Polygon').on("click", function() { circleFlag = false; polygonFlag = true; }) ; function addGraphic(evt) { //deactivate the toolbar and clear existing graphics tb.deactivate(); map.enableMapNavigation(); // figure out which symbol to use var symbol; symbol = fillSymbol; var graphic = new Graphic(evt.geometry, symbol); map.graphics.add(graphic); postGraphic(evt.geometry); } });
... View more
06-14-2017
01:16 AM
|
0
|
1
|
1359
|
POST
|
Can i get the solution for arcgis javascript api for same?
... View more
06-13-2017
09:51 PM
|
0
|
3
|
1359
|
POST
|
i had completed drawing circle in arcgis map but need to find the center and radius of the circle? Can anyone please help?
... View more
06-13-2017
01:56 AM
|
0
|
1
|
1128
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|