I have over 3 million points. I cannot have my server displaying all these points on a map a the same time.
What I want to do is when a building is selected, show all points within that polygon.
I know about this example:
Select with Feature Layer | ArcGIS API for JavaScript
I am not sure that will work because I don't want a buffer I want to use another Layer.
Thank you
Solved! Go to Solution.
Yep you can use the same idea as the sample you linked to but instead of using a buffer you'll just use the geometry of the other layer. Here's an example that selects all the points within a census block group.
If you look at the code you'll see that we setup a click handler for the block feature layer and when its clicked we query the point feature layer using the clicked geometry.
Yep you can use the same idea as the sample you linked to but instead of using a buffer you'll just use the geometry of the other layer. Here's an example that selects all the points within a census block group.
If you look at the code you'll see that we setup a click handler for the block feature layer and when its clicked we query the point feature layer using the clicked geometry.
That should work!
Thank you!
I was wondering if there is a way to have the selected census block highlighted as well?
It would be nice to know the boundary is for the block.
Is there a reason why when a geocoder is added it will not zoom to location?
Thank you!
That is exactly what I was looking for thank you!
So I am using polygons not points. Some polygons (soils) overlap some of the boundaries(taxlots).
For the life of me I cannot figure out how to change the color to indicate what polygon is selected(cyan outline).
It is confusing because there are so many features being selected.
The red taxlot is a boundary. Then two different features (soils) overlap that polygon are selected, indicated by a red dash.
When I select either polygon a cyan outline appears. This works when the map is zoomed out but when it is zoomed in it is impossible to tell what one is selected.
How do i change the color of the soils layer to indicate which one is selected?
Thank you
Rickey,
If I am understanding your concern then all you need to do is set the soil layer selection symbol. Look in the existing code for "setSelectionSymbol" for an example of the code syntax.
Robert,
Thank you for the quick reply!
I found the "setSelectionSymbol" you are talking about. When I add a color it changes the color of both polygons(soils) not the selected one.
// selection symbol used to draw the selected census block points within the buffer polygon
var symbol3 = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,
new Color([247, 34, 101]), 2), new Color([247, 34, 101, 0.25]));
censusPoints.setSelectionSymbol(symbol3);
I am looking for the selected one (cyan border) to change fill color when selected.
Rickey,
You have do the setSelectionSymbol for the soils layer the cyan outline is the selection symbol.