* Map Life Facts Top Level Domain

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
tatewise
Megastar
Posts: 27080
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Map Life Facts Top Level Domain

Post by tatewise » 13 Feb 2012 21:10

It appears that Google Maps API does not always correctly use the Top Level Domain (TLD) of the requesting PC to set its default Region Biasing.

This means that users with TLD = uk sometimes get USA places instead of UK places.
Bedford is good example, which by default plots to Bedford, Massachusetts, USA.
But if the Google Maps API is biased using &region=uk it plots to Bedford, Bedfordshire, UK.

The question is - how can the LUA script determine the TLD of its PC so the &region= parameter can be set appropriately?

ID:5920
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Map Life Facts Top Level Domain

Post by johnmorrisoniom » 13 Feb 2012 21:20

A way round it would be to modify the way that yo combine address and place names.
The user could have a drop drown area priorty list to be used if no country is present in the place field.
How that could be coded I have no idea

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

Map Life Facts Top Level Domain

Post by tatewise » 13 Feb 2012 21:37

Thanks John, I could offer various ways to allow users to bias the plotting, and users can already do it themselves by ensuring their place names include a country.
I was hoping to find a way of automatically forcing Google to do what its own documentation says it should be doing by default.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
BillH
Megastar
Posts: 2179
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Map Life Facts Top Level Domain

Post by BillH » 13 Feb 2012 22:31

Mike,

How about offering a place in the preference options to specify the country to use as the default for the region biasing?

Bill

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

Map Life Facts Top Level Domain

Post by tatewise » 14 Feb 2012 11:28

I have experimented with a Set Preferences Option for Region Biasing that seems to work well, and often improves plotting accuracy.

An advantage of this approach is that if you live in Canada, but researching family history in the UK, you can set the Region Biasing to the UK for plotting locations there.
Then if you discover a branch of your family in say Australia you can switch the Region Biasing to Australia while plotting locations there.
Once a location is plotted with Lat/Longitude values then it does not get plotted again, unless you choose to, so it is unaffected by the Region Biasing when Geocoding unplotted locations.

I have also allowed the Region Biasing to be turned off.
This feature should be in the next version.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply