Select to view content in your preferred language

Zoom and show nearest features?

693
3
01-04-2023 11:40 AM
MatthewMalone
Regular Contributor

I'm relatively new to Experience Builder, so I wanted to determine if the following is even possible.  Namely, is there a way that a feature can be zoomed into on a map and then display features/points from another layer that fall within a set distance?  

The general scenario is in regards to fire hydrant proximity.  Our Fire Department would like to enter an address, have the map zoom to that property at a set zoom level, and then only display fire hydrants within 1,000 meters of the property.  I'm not sure of Exp. Builder's query/buffer capabilities to know if this could be done on the fly.  

Any insights are greatly appreciated!

Thanks,

-Matt, Farmington Hills, MI

0 Kudos
3 Replies
novakc
by
Emerging Contributor

Hi.  I've been playing around with an AI Chatbot that is supposed to be able to answer any question.  To test it  I came to the community and yours was the first unanswered question I found.  This is what it said:

Yes, you can use the Buffer operation in Experience Builder to create a buffer around the property and then use the Select Within operation to select the hydrants within the buffer.

Here's how you can do this:

  1. Add a Map widget to your Experience Builder page and configure it to display the property layer and the fire hydrant layer.

  2. Add a Textbox widget to the page and configure it to accept an address.

  3. Add a Button widget to the page and configure it to execute a script when clicked.

  4. In the script, use the Geocode operation to convert the address entered in the Textbox widget to a location on the map.

  5. Use the Zoom To operation to zoom the map to the location of the property.

  6. Use the Buffer operation to create a buffer around the property with a radius of 1000 meters.

  7. Use the Select Within operation to select the fire hydrants within the buffer.

  8. Use the Update Layer Visibility operation to hide the fire hydrants that are not within the buffer.

This will cause the map to zoom to the property and only display the fire hydrants within a 1000 meter radius of the property.

https://chat.openai.com/chat

0 Kudos
MatthewMalone
Regular Contributor

Thanks! Funny thing is that I had even considered tying the chatbot on this very question. 🙂 I'll see if I can run through its step-by-step to ascertain if this actually works (might take me a while).

 

0 Kudos
novakc
by
Emerging Contributor

I read an article yesterday about the chatbot and now I can't stop asking it questions.  It's amazing!

0 Kudos