_addGraphic: function(pt, accuracy) { var circleSymb = new SimpleFillSymbol( SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SOLID, new Color([27, 95, 248,0.75]), 1 ), new Color([27, 95, 248,0.20]) ); var radius = accuracy; var circle = new Circle({ center: pt, geodesic: true, numberOfPoints: 120, radius: radius, radiusUnit: "esriMeters" }); this.halo = new Graphic(circle, circleSymb); map.graphics.add(this.halo); } showLocation: function(location) { //zoom to the users location and add a graphic var pt = new Point(location.coords.longitude, location.coords.latitude); if ( !this.graphic ) { this._addGraphic(pt, location.coords.accuracy); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.