timezonepicker icon indicating copy to clipboard operation
timezonepicker copied to clipboard

Pin Location for Montreal is incorrect

Open mal opened this issue 10 years ago • 5 comments

It appears in the ocean off of the west coast of Africa.

mal avatar Aug 08 '14 16:08 mal

This also affects Coral_Harbour.

This thread explains why they're missing country and location data (they've been deprecated; timezone works but country and location data are gone).

Solved this locally by just pointing the polygons in question at their aliases; America/Toronto and America/Atikokan respectively, along with their data-pin value.

Guessing that this will be solved properly by a map update (once the maps themselves have been updated).

mal avatar Aug 09 '14 03:08 mal

Could you post your local patch?

brunobg avatar Sep 08 '14 17:09 brunobg

After an email conversation with the guy that maintains the source map, it seems that the problem lies with using zone.tab to get country and lat/lon information for TZP. The problem stems from the fact that some tzids are dumb links to others, and as a result have no metadata of their own (country, primary location lat/lon). He suggested a more robust approach might involve marrying the tz map with the fipsc map, allowing extraction of both the tzid and the country from the map, and forgetting about zone.tab. I am unsure if this approach would support extraction of a primary location to use for the pin however.

Given all this information we decided that it would be easier to just manually set the country and make up a pin location based on Google maps. Rather than alter the source data, we generated the image map and then manually edited the appropriate lines, saving the result and serving it as a static asset.

The amended lines are below. It's not an ideal solution, but for the sake of making it work, it does the job.

<area data-timezone="America/Montreal" data-country="CA" data-pin="176,73" data-offset="-5" shape="poly" coords="...">
<area data-timezone="America/Coral_Harbour" data-country="CA" data-pin="160,42" data-offset="-5" shape="poly" coords="...">

Hope this helps!

mal avatar Sep 09 '14 00:09 mal

Also appears to affect:

  • Asia/Chongqing
  • Asia/Harbin
  • Asia/Kashgar

Since it is known that this problem exists, couldn't a fix / override be coded into the generator to detect when data-country == "" and replace the info with corrected data?

Cat5TV avatar Oct 26 '16 14:10 Cat5TV

Workarounds for @Cat5TV's find:

<area data-timezone="Asia/Chongqing" data-country="CN" data-pin="475, 100" data-offset="8" shape="poly" coords="483,114,482,114,481,113,481,114,479,114,478,113,478,112,476,111,473,112,472,112,472,113,471,112,469,113,470,115,469,115,469,114,467,114,467,113,465,113,466,112,465,111,465,110,463,110,463,108,465,107,465,104,463,103,465,103,464,102,465,101,465,98,462,95,463,94,462,94,464,94,465,93,465,92,465,92,465,90,466,87,466,87,466,87,462,85,463,84,461,84,462,82,464,82,462,79,468,79,475,81,479,79,484,79,485,78,488,80,491,80,490,81,490,82,487,83,485,84,484,86,485,87,484,92,485,94,483,95,484,96,482,96,484,98,481,99,481,100,482,102,482,104,481,105,482,105,482,106,483,107,485,106,485,108,486,108,487,109,486,111,487,111,488,113,486,114,485,113,486,113,485,112,483,114"/>
<area data-timezone="Asia/Harbin" data-country="CN" data-pin="509,75" data-offset="8" shape="poly" coords="509,82,508,78,507,79,506,78,505,76,504,76,504,75,503,74,505,74,505,72,506,72,504,71,507,69,508,70,510,65,509,64,505,64,504,63,507,61,510,62,513,67,518,69,518,71,524,69,525,70,522,75,520,74,518,75,519,78,517,79,518,79,517,78,516,79,513,80,514,81,512,80,509,82"/>
<area data-timezone="Asia/Kashgar" data-country="CN" data-pin="430,95" data-offset="6" shape="poly" coords="434,99,431,98,431,96,432,96,432,95,431,94,432,93,430,92,430,91,427,90,426,89,424,88,425,88,425,86,423,86,423,85,425,82,427,83,428,82,430,82,434,80,434,79,435,78,434,75,433,75,436,74,438,75,436,76,442,78,438,77,439,78,438,78,438,80,436,82,437,84,438,84,437,88,438,90,437,91,437,92,437,93,439,95,439,97,438,97,439,98,439,99,437,99,435,100,434,99"/>

DSoa avatar Dec 21 '16 15:12 DSoa