Stupid Simple Map (SSMap) might be the easiest way ever to add a map to your website. You just have to add the <script> tags where you want the map to show up. There’s no making divs, no finding tile URLs, etc.
For example, if you place
in your HTML document, you would see something like this:
Odds are you’d like to have some control over your map, and you do that by setting a query string to the ssmap.js file. For example:
would give you:
The marker appears at the center of the map any time the coordinates are not (0,0).
Each of these options are set in the query string. All options are optional, and I tried to provide sane defaults.
|lat||0||Latitude (decimal degrees)||-90 to 90|
|lon||0||Longitude (decimal degrees)||-180 to 180|
|div||random ID||string||Map div ID. The div also get class ssmap|
|h||500px||Valid CSS height||Height of the map div (including units)|
|w||500px||Valid CSS Width||Width of the map div (including units)|
|z||1||1-18||Initial zoom level|
|tiles||sat||map (street map) or sat (satelite)||Which tiles to use|
|mark||t||t (true) or f (false)||Place a marker at the map centerpoint if coordinates are not set to 0,0?|
Notes For Advanced Users
For advanced usage, you’ll want to use Leaflet directly. It’s not hard, and you can customize just about anything.
You can download the uncompressed version on Github or here.
This script won’t work with SSL. I don’t have SSL configured on this host, and the script itself loads the Leaflet libraries via http (https isn’t available).