Map Visualization - Zoom to Query Results

automan25

Member
Is there a way to get a google map visualization to zoom to the results of the list rather than manually selecting a zoom level?
 
You mean "fit to bounds" (I think the map API calls it), so the map zooms to show all the markers?

No, there wasn't a built in way of doing it. So I just added it ...

https://github.com/Fabrik/fabrik/commit/1f11c9da2f7ff147510bdb4de614163594119155

If you do a github update (see wiki if you haven't done one before), you should have the new option. I haven't tested it extensively, but it seems to work. Don't know if it'll play nicely with clustering, though.

-- hugh
 
Thanks cheesegrits. That was mighty quick. I updated via GitHub and can now see the option to zoom to bounds, but unfortunately no map show up at all now. Any ideas?
 
And from what I can see on the front end, in that module, the "fit to bounds" option isn't set. But I can't get at the backend to check.

-- hugh
 
Well the fitbounds code is now being called, but it's hard to tell with such a small data set, just 3 markers a few miles apart.

Any way you can add some more over a wider area for testing?

-- hugh
 
Okay. I added several more properties. Two more in the Seattle area, two in the Portland, OR area, and 2 in Spokane, WA. Fit to bounds does not work on my computer. Also, strangely, the two Portland properties and one of the Spokane properties are placed in downtown Seattle on the map. The other ones appear to be correct.
 
Okay. It's been updated. The zoom to bounds seems to work just fine now. I'm still having issues with the two Portland area addresses showing up in downtown Seattle. No doubt that's a totally separate issue. I also noticed that the map does not render on my Chromebook, but looks just fine in Chrome on my Windows machine. Thanks again. Having zoom to bounds working is going to help a lot of people.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top