Dear WeatherCat user who like to be precise about where there are at,
A map of your weather station's location goes a long way toward orienting visitors to the data you are collecting. There was a time when such information could be easily added to your website for free from Google. However as reported elsewhere, Google has gone
"corporate" with this service:
https://athena.trixology.com/index.php?topic=3368.msg32257#msg32257My WeatherCat website is sadly overdue for some serious maintenance, but thanks to the thread noted above, I did resolve the issue of a broken map. After doing a few rounds (or should I say futile loops) trying to understand Google's new rules, I decided to look elsewhere: OpenStreetMap.org. This mapping service is open-source and thus completely free of all the corporate strings of it rivals. The OpenStreetMap Wiki has all the basic instructions you really need:
https://wiki.openstreetmap.org/wiki/Export#Embeddable_HTMLHowever, there is some sage advice to be considered in switching. My old Google map was fixed in resolution, so what was centered on didn't really matter. What was displayed was most of the San Francisco Bay Area. As will become clear shortly, this bit of sage advice from X-Air (from the same thread) is extremely relevant to OpenStreetMap:
Instead of publishing your exact home address, consider a more generic 'map' using a local police or fire station and have the 'map' cover several square miles of area. I don't include any map of our house location except where needed by a few of the "partners" I share my wx data with. And I notice that some of those tend to lose track of me, anyway. ![[rolleyes2]](https://athena.trixology.com/Smileys/default/rolleyes1.gif)
With that notion in mind I decided to launch OpenStreetMap with the address of a nearby grammar school.
That this point you can simply follow the instructions in the OpenStreetMap Wiki which read as follows:
To embed OpenStreetMaps, you simply: Go to https://www.openstreetmap.org.
...
3. OpenStreetMap
Navigate to the area you want to display.
Click on the sharing button.
Click the “HTML” option.
Click “Add a marker to the map.”
Copy the HTML text in the box (starts with <iframe).
Past the code into your web app.OpenStreetMap has a nice so-called
Slippy map which is an active Ajax component Javascript that allows you to zoom, pan, and otherwise explore the map location. That's helpful for the visitor, but if you provided your exact address, they could quite literally zoom in until they saw your home location - thus the wisdom in providing a nearby and public location instead.
There is one more bit of advice that isn't obvious from the OpenStreetMap documentation. The display default of OpenStreetMap is a true square. There are cases when a rectangle would be preferable. In such cases it might not display as you expect. To get a handle on how things would be displayed I created a small test HTML page to experiment with:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Test of an embedded OpenStreetMap</title>
</head>
<body>
<div align="center"><b>Test of an embedded OpenStreetMap</b><br>
</div>
<br>
<iframe scrolling="no" marginheight="0" marginwidth="0"
src="https://www.openstreetmap.org/export/embed.html?bbox=-122.36881256103516%2C37.69658933039993%2C-121.93691253662111%2C37.99453932469732&layer=mapnik"
style="border: 1px solid black" frameborder="0" height="480"
width="640"></iframe><br>
<small><a
href="https://www.openstreetmap.org/#map=12/37.8456/-122.1528">View
Larger Map</a></small>
</body>
</html>
You can view the test page here:
http://www.canebas.org/WeatherCat/Forum_support_documents/OpenStreetMap_test.htmlI finally installed the new map on my existing website as can be seen here:
http://www.canebas.org/Weather/Canebas_region.htmlSo if your WeatherCat website doesn't have a map, or you want to change it to OpenStreetMap, it is a quick and easy upgrade to make.
Cheers, Edouard