I have tried this couple of ways but have not been able to get it working. I want to place clocks at the top of the map within multiple timezones. I have a the javascript to create the clock and I place the clock in a div element.
Here is what I tried:
- Create a Point with
0,0coordinates. - From this point get the latitude value for the top of the map using
containerPointToLatLng. - Create
LatLngusing the above lat and long for the timezone. - Converted this
LatLngto Point and then positioning the div element with thex,yfrom this point.
I execute the logic both when the page is first rendered and then on body resize. However, if I change the size of the browser window, the clock does not position correctly.
Any suggestions?