Template talk:GBNewYorkState
From Wikipedia, the free encyclopedia
This template displays a map of New York State Image:GBNewYorkState.png and places a red dot Image:GBRedDot.png in an appropriate place. Call is of the form
- {{GBNewYorkState|Px|Py}}
where Px and Py are numbers which specify the location of the dot. If the longitude Lx and Latitude Ly are known, the pixel positions for the dot can be calculated by
- Px = (-32.434 × Lx) + 2591.4
- Py = (-45.363 × Ly) + 2041.8
The latitude and longitude must be in degrees and fractions of a degree, and longitude is a positive number (contrary to convention). For example, Buffalo, NY is at latitude 42 degrees, 54 minutes, 17 seconds. In degrees thats Ly=42+54/60+17/3600=42.9047 degrees. The pixel position Py is then (-45.363 x 42.9047) + 2041.8 = 95. Similarly, Px=34 and so, to display the map with a red dot at Buffalo, NY one would use
- {{GBNewYorkState|34|95}}
Due to distortions and other reasons, these numbers can be off by a noticeable amount, so they should be checked and corrected before saving. PAR 21:07, 27 November 2005 (UTC)
- The creator of the template Template:Infobox Town NY has modified the template so it accepts this image template. Which means no creating unique image files for every location in NYS. However, in testing it I discovered that the red dot image () does not display in MS IE. It isn't a problem with the templates -- the actual image just does not appear in IE. The state image file does. Both display fine in Firefox, so time to investigate what happens with other browsers as well. Jim Dunning 18:12, 31 July 2006 (UTC)
[edit] Internet Explorer problem
There seems to be a transparency issue with Internet Explorer and PNG images (PNG#Internet Explorer incompatibility). I have changed the PNG image to a JPG in order for more users to get the full effect of this template. --Zimbabweed 00:10, 10 December 2006 (UTC)