Buffering - How do I create geometries manually

2711
2
Jump to solution
12-15-2015 02:23 AM
roberttilson
New Contributor II

In the example Buffer a point | ArcGIS API for JavaScript  , a buffer is displayed based on the click event. Is there a way I can manually the point location?.

The line in question  is params.geometries = [ evt.mapPoint ];

I want to simply new up a geometry with 1 or many points, but can't find a way to do it. I have the x, y values I need and the buffer.

Thanks

Rob

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
MajdiTurkman1
New Contributor III

Simply create a point and use it instead of "evt.mapPoint" as follows:

First:

dojo.require("esri.geometry.Point");

Then:

var point = new esri.geometry.Point(-96.816, 32.976);
params.geometries = [ point ];

View solution in original post

0 Kudos
2 Replies
MajdiTurkman1
New Contributor III

Simply create a point and use it instead of "evt.mapPoint" as follows:

First:

dojo.require("esri.geometry.Point");

Then:

var point = new esri.geometry.Point(-96.816, 32.976);
params.geometries = [ point ];
0 Kudos
roberttilson
New Contributor II

Thanks,

I had my parenthesis mixed up.

0 Kudos