POST
|
Hi Sorry I should have been clearer. I am hoping that the user will only be able to draw circles that are a specific radius (10km). So no larger or smaller. Thank you to all for the very helpful replies. I will try and put your suggestions into action today and hopefully I can finally get this very pesky problem pinned down.
... View more
02-09-2015
03:32 AM
|
0
|
2
|
794
|
POST
|
Hi Robert, thank you for your help. This is the toolbar initiate code I have - I'm assuming I can make the amendments you suggest here? function initToolbars() { drawfillsymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 3.0), new dojo.Color([255, 255, 0, 0.2])); drawmarkersymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, 25, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 3.0), new dojo.Color([255, 255, 0, 1.0])); drawlinesymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 3.0); drawToolbar = new esri.toolbars.Draw(map); drawToolbar.setFillSymbol(drawfillsymbol); drawToolbar.setMarkerSymbol(drawmarkersymbol); drawToolbar.setLineSymbol(drawlinesymbol); editToolbar = new esri.toolbars.Edit(map); dojo.connect(drawToolbar, "onDrawEnd", addSearchGraphic); dojo.connect(editToolbar, "onDeactivate", editGraphicEnd); graphicClickListener = dojo.connect(searchgraphicsLayer, "onClick", graphicsLayerClicked); }
... View more
02-06-2015
06:02 AM
|
0
|
6
|
794
|
POST
|
I am using this code to draw a circle: $('#circle').click(function () { clearPreviousSearch(); map.disableMapNavigation(); $('#run').fadeOut(); buttonclickvalue = 'circle'; drawToolbar.activate(esri.toolbars.Draw.CIRCLE); }); I've been told I need this code to constrain the radius: var circle = new Circle({ center: e.mapPoint, geodesic: domAttr.get(geodesic, "checked"), radius: 100, radiusUnit:units.MILES }); But where on earth should it go - it's driving me nuts!!
... View more
02-06-2015
01:19 AM
|
0
|
8
|
4769
|
POST
|
Hi Rene I've included the script here that I started with. I've tried the suggestions this morning but still finding it rather confusing - will stick at it and see what I can come up with - any help appreciated. Sample code here: JS Bin - Collaborative JavaScript Debugging
... View more
12-17-2014
03:12 AM
|
0
|
0
|
526
|
POST
|
What's the simplest way to create a buffer round a circle. The current application creates a square buffer and I want it to reflect the circle shape. I've tried using getExtent but it just draws a square: if (geometry.type === "polygon") { var searchExtent = geometry.getExtent(); var biggerExtent = new esri.geometry.Extent(searchExtent.getExtent().expand(1)); wkid : 27700; I also tried getCenter: if (geometry.type === "polygon") { var searchExtent = geometry.getExtent(); var centerPoint = newGeometry.getCenter(); var radius = newGeometry.getExtent().getWidth()/2; var circleGeometry = new Circle(center, {"radius": radius}); wkid : 27700; which returns an error. Can anyone help please?
... View more
12-16-2014
09:08 AM
|
0
|
4
|
2755
|
POST
|
At the moment I have 3 menu items that draw a line, point or area on a map. I'm using esri.bundle.toolbars.draw.addPoint = "Click the map at the location you want to search"; as a tooltip for drawing the point. However for the draw area and line I want a different tooltip for each so that it reads: "Click to start drawing a search line" for a line and "Click to start drawing a search area"; for an area. At the moment this is the code that's used so that the line tool tip reads as area. Is there a way to distinguish between the two? esri.bundle.toolbars.draw.addPoint = "Click the map at the location you want to search"; esri.bundle.toolbars.draw.start = "Click to start drawing a search area"; esri.bundle.toolbars.draw.resume = "Click to continue drawing your search area"; esri.bundle.toolbars.draw.finish = "Click to continue drawing or Double-click to finish"; esri.bundle.toolbars.draw.complete = "Click to continue drawing or Double-click to finish"; esri.bundle.widgets.legend.NLS_noLegend = "Legend will appear here when search results are displayed on the map."; map = new esri.Map("map", { logo : false }); Any help appreciated!
... View more
11-10-2014
06:27 AM
|
0
|
3
|
5651
|
POST
|
How can I determine the spatial resolution of a map - is this derived from the scale of the mxd, as this is not set so is there a way of doing this? Any help appreciated.
... View more
11-19-2013
01:45 AM
|
0
|
2
|
1226
|
POST
|
Hi I have been sent a zipped folder containing files in a geodatabase format. To view them in ArcMap I've created a new file outside ArcCatalog with the extension .gdb and copied the unzipped files into this new file. Outside ArcGIS I can see all the files are present but when I try to preview in ArcCatalog there are no files in the new folder. I've also tried to 'Add data' in ArcMap but still nothing and I've also tried doing the whole copy and paste thing from within ArcCatalog but still no joy. Can someone help please?? What am I doing wrong? Thank you!
... View more
05-13-2013
02:10 AM
|
0
|
0
|
429
|
POST
|
Hi, I'm trying to connect to a web map server, usually I can tell which part of the url to delete but can someone help with the following: http://inspirescotland.org/cgi-bin/mapserv.exe?map=E:/ms4w/apps/sg_inspire/inspire.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities& Keeps saying there is a connection error but think it's because I'm including the GetCapabilities code - but which part of the code should I delete? Thank you!
... View more
05-01-2013
02:04 AM
|
0
|
0
|
660
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|