Help With JS Sample

597
3
Jump to solution
10-24-2012 12:46 PM
RobertPincus
New Contributor III
I am trying to modify the sample "Query and immediately open info window". I got the sample to open an infoWindow when I click on a polygon. But it does not work for line feature layers. What do I need to do to get it to work?

Thanks,
Robert
0 Kudos
1 Solution

Accepted Solutions
RobertPincus
New Contributor III
Figured it out.I created a polygon by adding 10 feet to the coordinates of the mouse click and assigning that to the query geometry.

Thanks,
Robert

View solution in original post

0 Kudos
3 Replies
JeffPace
MVP Alum
I am trying to modify the sample "Query and immediately open info window". I got the sample to open an infoWindow when I click on a polygon. But it does not work for line feature layers. What do I need to do to get it to work?

Thanks,
Robert


more than likely you are just "missing" the line.  In the query task, you might want to buffer the click geometry before passing it to the query.
0 Kudos
RobertPincus
New Contributor III
more than likely you are just "missing" the line.  In the query task, you might want to buffer the click geometry before passing it to the query.


That's what I was thinking. I was looking on how to do that, but I did not find anything. Do you know how?
0 Kudos
RobertPincus
New Contributor III
Figured it out.I created a polygon by adding 10 feet to the coordinates of the mouse click and assigning that to the query geometry.

Thanks,
Robert
0 Kudos