One Last Change to the Charts

Dive Sites - pick your starting point

Since starting the site, I used charts with white water and gray land, and when I re-built all the charts in OpenLayers, it was easy enough to duplicate that. But I noticed that when you print a page, the gray land disappears. I have never found any documentation on the OpenLayers json map specifications, but I picked-apart some examples and eventually hacked-together a solution where the land is green and it does print. So hooray for that.

If your charts are still gray, you need to do a 'hard reload' of the page: hold the shift key down while clicking the refresh button in your browser. The more I look at it, the more I like the green. I also made some tweaks to the program and the data so the charts work much better on small screens like phones.

All-in-all, these OpenLayers maps are terrific. My initial worry was server overloading. That is simply not a problem. In fact, the server-side performance is so good that, while I would normally cache things that are used repeatedly, like menus, I don't see much point in caching the scripts that generate the charts. Each one is just a single database query and some very fast processing. It would be difficult to come up with a bullet-proof caching scheme anyway.

Client-side rendering was also a concern, but I have not seen a problem in any modern browser on any platform, even on my phone. Certain map sources have rendering glitches on certain browsers; I just don't use those sources. Otherwise, all the outside map sources I have tried have been reliable and fast. Very fast since I eliminated all the land-side data like roads and places.

Cost is also not a problem. I ditched Google the first time they sent me a bill. They are the last people I want reaching into my pocket! The free maps I am using now are better anyway. Google has way too much advertising.

I wrote all the code to integrate OpenLayers with WordPress myself. I started with a bought 'plugin'. I began finding and fixing bugs in that, and writing extensions for it. I sent all my very easy bug fixes to the authors of the plugin, and to date they have not implemented a single one. I became dissatisfied with that, so I tried writing my own replacement 'core', at first just to see if I could. I got the basic part working pretty quickly, much to my surprise. That grew in polish and capabilities until it was better (for my purposes) than the code I bought, so I switched to it.

If I wrote out a specification for everything I ultimately did, I would look at it and say "No way" and not even try. So the whole thing really happened by accident. I took nothing from the package I bought except inspiration. I am still stunned at how well all of this works.

On a side note, NOAA used to publish all their charts as beautiful detailed pdf files that you could download and keep on your computer. They stopped doing that, now all the charts are in some online format that is hard to use and not portable at all. I am keeping my old pdfs! All the more reason to make my own system. Very bad on NOAA, they should continue to offer the pdfs as an option. This decision was probably made by some desk-bound bureaucrat who gets seasick in his bathtub.


from AWOIS:

H10224/86 -- OPR-C121-WH-86; WRECKAGE WITH 52 FT PNEUMATIC DEPTH GAUGE LEAST DEPTH, WHICH IS BELIEVED TO BE THIS ITEM, APPROXIMATELY 100M SW OF AWOIS POSITION; DIVERS FOUND THE WRECK OF A BARGE, APPROXIMATELY 20 X 45 M; THREE BOILERS AND NUMEROUS OTHER TYPES OF SHIPYARD DEBRIS WERE FOUND STREWN OVER AN AREA OF 360 X 165 FT; IN THE NW CORNER OF THE SITE THE REMAINS OF ANOTHER WRECK WAS FOUND WITH ONLY THE SHELL PLATING AND FLOOR FRAMING REMAINING; APPROXIMATELY 200 FT LONG, 27 FT BEAM AND SHELL PLATING EXTENDING 5 FT ABOVE THE BOTTOM; BOTH ENDS OF THE WRECK TAPERED INTO THE SAND WITH NO BOW OR STERN VISIBLE; ONE OBJECT CONSISTING OF GUARD RAIL TYPE METAL, APPROXIMATELY 2 FT WIDE, 3/8 INCH THICK, AND 40 FT LONG, FORMING A 60 DEGREE ARCH WITH THE MIDDLE STANDING 10 FT OFF THE BOTTOM; SITE CONSISTED OF TWO WRECKS AND SHIPYARD DEBRIS, INCLUDING A BOOM CRANE; LEAST DEPTH TAKEN ON THE TOP OF THE BOILER LOCATED AT THE NORTHEAST SECTION OF SITE. (UPDATED MSD 4/91)