POST
|
We should have a contact. I'll have someone look into it. Thanks again.
... View more
02-29-2012
09:39 AM
|
0
|
0
|
576
|
POST
|
Is there an equivalent geometry server under premiumtasks.arcgisonline.com with https implemented?
... View more
02-29-2012
07:38 AM
|
0
|
0
|
576
|
POST
|
Sorry, it's been a few months since I worked on this. Code snippets below. If I understand correctly we should be able to simply replace all the http: with https:, correct? map = new esri.Map("map"); var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcg isonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); map.addLayer(layer); map.setExtent(esri.geometry.geographicToWebMercator(new esri.geometry.Exte nt(xMin, yMin, xMax, yMax, new esri.SpatialReference({wkid: 4326})))); gsvc = new esri.tasks.GeometryService("http://sampleserver3.arcgisonline.c om/ArcGIS/rest/services/Geometry/GeometryServer"); dojo.connect(map, "onLoad", doAll); function doAll() { drawLine(Xref,Yref,Xloc,Yloc); var x = Xloc; var y = Yloc; var dist = <%=radius%>; color = RED; drawCircle(x,y,dist,color); x = Xref; y = Yref; color = BLUE; dist = <%=refRadius%>; drawCircle(x,y,dist,color); } function drawLine(x1,y1,x2,y2) { var p1 = new esri.geometry.Point(x1, y1, new esri.SpatialReference({wkid:4 326})); var p2 = new esri.geometry.Point(x2, y2, new esri.SpatialReference({wkid:4 326})); var geographicGeometry = new esri.geometry.Polyline(new esri.SpatialRefere nce({wkid:4326})); geographicGeometry = geographicGeometry.addPath([p1,p2]); var mapGeometry = esri.geometry.geographicToWebMercator(geographicGeometry ); var symbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol .STYLE_SOLID, new dojo.Color([255, 0, 0]), 3); var graphic = new esri.Graphic(mapGeometry ,symbol); map.graphics.add(graphic); } function drawCircle(x,y,dist) { var params = new esri.tasks.BufferParameters(); var myPoint = new esri.geometry.Point(x, y, new esri.SpatialReference({wki d: 4326}) ); params.geometries = [ myPoint ]; params.distances = [ dist ]; params.unit = esri.tasks.GeometryService.UNIT_KILOMETER; params.outSpatialReference = map.spatialReference; gsvc.buffer(params, showBuffer); }
... View more
02-28-2012
09:27 AM
|
0
|
0
|
576
|
POST
|
Yes, we're using ArcGisOnline, specifically ArcGISTiledMapService. I think they were successful in getting the maps to render but the geometry tasks (drawing circles & lines) were not. I'll have a look at your example. Thank you.
... View more
02-28-2012
07:37 AM
|
0
|
0
|
576
|
POST
|
Is there an https implementation of the MapServer? We are using ESRI hosted map server and geometry functions to draw on rendered maps. We would like to be able to retrieve via https so as not to get security warnings on client systems. Is this possible?
... View more
02-28-2012
06:47 AM
|
0
|
10
|
1470
|
POST
|
Just trying to draw the line at this time. With a minor typo change: geographicGeometry = geographicGeometry.addPath([p1,p2]); this function works just fine. The geographicToWebMercator method was what I was looking for. Thank you. Jim
... View more
09-06-2011
05:09 AM
|
0
|
0
|
295
|
POST
|
In the examples I've seen the polyline is buffered and I think the reason is for mapping the geo coordinate space into the projection in the browser. Your example works when I have the map units but I have decimal degrees coming from another external web service. Sorry if I wasn't clear there. One of the examples I was working from is here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/util_buffergraphic.html
... View more
09-02-2011
11:59 AM
|
0
|
0
|
295
|
POST
|
I've read several examples but it looks like I'm still missing something here. Beginning with 2 pair of coordinates, e.g. -85.1, 33.4 and -85.2, 33.3, I draw circles around the points and then try to draw a polyline between them. I can buffer the points fine but having a problem with the line draw. The SpatialReference on the map and buffered points is wkid:4326. function drawLine(x1,y1,x2,y2) { var params = new esri.tasks.BufferParameters(); var p1 = new esri.geometry.Point(x1, y1, new esri.SpatialReference({wkid:102100}) ); var p2 = new esri.geometry.Point(x2, y2, new esri.SpatialReference({wkid:102100}) ); var geometry = new esri.geometry.Polyline(new esri.SpatialReference( {wkid:102100} )); geometry = geometry.addPath([p1,p2]); params.geometries = [ geometry ]; params.bufferSpatialReference = new esri.SpatialReference({wkid:102100}); params.outSpatialReference = new esri.SpatialReference({wkid:102100}); gsvc.buffer(params, showLineBuffer); } function showLineBuffer(geometries) { var symbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 3); dojo.forEach(geometries, function(geometry) { var graphic = new esri.Graphic(geometry,symbol); map.graphics.add(graphic); }); }
... View more
09-02-2011
10:43 AM
|
0
|
4
|
569
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|