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.


dive flag

All divers are required to show a flag when in the water. When boat diving, the boat will fly the flag for you, but when shore diving you must take care of this yourself. All dive shops sell flag/floats and lines. The simple fiberglass pole type is inexpensive and works fine; there is no need to buy anything extravagant - it will only get beat-up. If you plan to stay in one place, you can tether the flag to an extra weight on the bottom, or even just prop it up at the shore. If you plan to move around, then you should drag it behind you.

dive flag line

Use only polypropylene for a flag line, never nylon. Polypropylene floats, so when it goes slack it will float up away from you, instead of sinking down in coils around you, like nylon. The big yellow spools that dive shops sell work very well. Although they look clumsy, their size makes them easier to handle in the water. With experience, you will learn to gauge the amount of line necessary to keep the flag from being pulled under, without letting out a huge excess to get tangled up in. Add a brass snap to clip it off for hands-free use. Once you get used to it, dragging a flag is really no trouble at all.