* Mapping questions.

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
Ron Melby
Megastar
Posts: 878
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Mapping questions.

Post by Ron Melby » 11 Feb 2022 11:13

For all you ancient and arcane geometers out there (LOL, mostly Mike I think)

1) I cannot for the life of me figure out how you set map boundaries to display, and would like to be able to do that.

2) given a point in lat, long... is there a shortcut (maybe some sort of reversal of haversine, so that I can proscribe points within an x mi or km radius of that point, without going thru every pair in my tables (addr and plac) and doing a haversine? Here is the concept, which I think you can immediately simplify.

given a table of lat longs, take the first in table and get all pairs in x radius moving them to another table, and nil the original entry. Having completed that round are there entries left? take the first entry available, and run thru that, and so on until the table is empty.

having these groupings, find the centerpoint of each grouping, mark it, and then check distance and direction of centerpoint to centerpoint. (there would be a master centerpoint, (my location) that every other center would be checked against. (I guess fundamentally, nodes on a network, traveling salesman, or something like that).
FH V.6.2.7 Win 10 64 bit

User avatar
tatewise
Megastar
Posts: 27080
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Mapping questions.

Post by tatewise » 11 Feb 2022 12:12

The short answer is that I don't ever explicitly set map boundaries in plugins.
I use the Google Maps API and Leaflet Maps API that allow all the current plots to be displayed by using the Bounds feature.
That involves JavaScript to invoke all the map display methods to plot, zoom, bound, etc, the displayed map.
See https://developers.google.com/maps/docu ... avascript/ and https://leafletjs.com/.

So I never need to perform any plugin script to adjust the map zoom level to include all plots. I let the map do it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply