Flag Issue

Problems ? Get help here!
User avatar
nick
Site Admin
Posts: 4376
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Flag Issue

Post by nick »

pmareschal wrote: Just another suggestion.
I was thinking of something along these lines, but localised.
(BTW: Import no problem with Suunto Cobra, Mosquito, Vytec after installation, OSX 10.6.4, official suunto USB adapter, FTDI USB drivers. Imported dives from 1.5.3, extensive normalisation but I survived it.)
Nice.
Antarctic-adventurer
Posts: 16
Joined: Mon Jul 19, 2010 4:01 pm
Dive Computer: Suunto D5 & D6

Re: Flag Issue

Post by Antarctic-adventurer »

Not sure what the status of this issue is so far, but just for info, "The Philippines" also doesn't bring up the correct flag.

Edit: for the time being I have edited the package contents of MacDive as suggested to fix this. Would be great to see this fixed in a future update so that both "Philippines" and "The Philippines" results in the correct flag being displayed.

Thanks for all your hard work... :D
Last edited by Antarctic-adventurer on Thu Dec 30, 2010 9:51 am, edited 1 time in total.
adrianwi
Posts: 15
Joined: Wed Jul 14, 2010 4:58 am
Dive Computer: OSTC 2N

Re: Flag Issue

Post by adrianwi »

Scotland has it's own flag so would be nice to have one for England, rather than just UK or GB.

Any idea what St Lucia needs to be :?:

Edit: Doh - Saint works fine :mrgreen:
Bisente
Posts: 4
Joined: Sat Aug 28, 2010 5:55 pm
Dive Computer: Suunto Vyper2

Re: Flag Issue

Post by Bisente »

Hi

I've been playing around with the Google Maps WS API, which I think is what you're using for geocoding, nick.

If I look for a (more or less) specific address:

http://maps.google.com/maps/api/geocode ... ensor=true

One of the things you get back is the 2-letter country code:

"long_name": "España",
"short_name": "ES",
"types": [ "country", "political" ]

You could use that code returned from Google to map the flags, that way it would be independent from language and different ways to write a country's name (UK vs. U.K. vs. United Kingdom).

The problem is that Google doesn't always return the country. For example, now I'm looking for a nearby island where I usually dive:

http://maps.google.com/maps/api/geocode ... ensor=true

If you see the result there's lots of geo-political information (the city, postal code, province and community) but in this particular case the country is missing. But, if now you do a second step looking for the lat-lng on the previous result:

http://maps.google.com/maps/api/geocode ... ensor=true

voila! The country and 2-letter country code:

"long_name": "España",
"short_name": "ES",
"types": [ "country", "political" ]

I've tried with several random lat-lng and it seems that Google always returns the country and country code when you geolocate a lat-lng. So if you don't get the 2-letter code on the address search, it seems you could always do a lat-lng search then and get it.

What do you think?

Regards
User avatar
nick
Site Admin
Posts: 4376
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Flag Issue

Post by nick »

Well the country in a site doesn't necessarily have coordinates associated, it may just be text. Then you wouldn't have a country code, short of making the user enter it manually.

I would still rather leave it working off the country name for now, but perhaps that's a good way to provide a further refinement, if proper coordinates have been entered and it can be looked up.
hagbard86
Posts: 5
Joined: Mon Oct 18, 2010 3:02 am
Dive Computer: D9

Re: Flag Issue

Post by hagbard86 »

I would need Croatia!? :P
User avatar
frogger
Posts: 11
Joined: Sun Jul 25, 2010 8:14 am
Dive Computer: Suunto D4

Re: Flag Issue

Post by frogger »

Can we add the 'Canary Islands' flag to one of the updates please? Pretty please! :D
User avatar
nick
Site Admin
Posts: 4376
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Flag Issue

Post by nick »

hagbard86 wrote:I would need Croatia!? :P
It's there..
User avatar
nick
Site Admin
Posts: 4376
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Flag Issue

Post by nick »

frogger wrote:Can we add the 'Canary Islands' flag to one of the updates please? Pretty please! :D
Done. Will be in the next patch, or if you like, email me and I'll send you an updated copy you can use until that's out.
User avatar
frogger
Posts: 11
Joined: Sun Jul 25, 2010 8:14 am
Dive Computer: Suunto D4

Re: Flag Issue

Post by frogger »

Nick you are awesome. I have already updated the flag on my latest version so I will just wait for the next update. 8-)
Post Reply