Git Product home page Git Product logo

geoalbum's Introduction

GeoAlbum

So. You've got a hundred photos and a GPS trace, and you want to make browsing those photos comfortable for your readers. Here is the solution. Make thumbnails for all photos and make an html file like this:

<title>Georeferenced photos</title>
<link href="geoalbum.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js"></script>
<script src="geoalbum.js"></script>

<div><h1>Opening slide</h1>
<p>Hello and welcome to my photo album!</p>
<p>Change pages by pressing arrow buttons on keyboard, or by clicking relevant links on top and bottom.
The map to the right shows page locations, you can click on numbers to open a page for that location.
All images can be opened in bigger size by clicking on them.</p>
</div>

<div><h1>The first photo</h1>
<div lat="60.667533" lon="30.03332"><a href="01a.jpg"><img src="01a-t.jpg"></a></div>
<p>This is first two photos I took on my trip.</p>
<div lat="60.667636" lon="30.033235"><a href="01b.jpg"><img src="01b-t.jpg"></a></div>
</div>

<div>...</div>

Note geoalbum.js and leaflet.js included. Those will make a beautiful photo album with a map and slides from this simple page. You can check out an example album, for which this library was written. Thanks to Tom MacWright for inspiration. The source is released under WTFPL, so feel free to alter it in any way.

Leaflet.LetterMarker

The album needed a special kind of marker: the one with letters on it. So I wrote a plugin that slightly modifies leaflet's Marker class. Just include Leaflet.LetterMarker.js script in your page and create markers like that:

L.letterMarker([12.34, 56.78], 'A', { color: 'blue' }).addTo(map);

This plugin is also licensed WTFPL.

geoalbum's People

Contributors

zverik avatar

Stargazers

Yuri avatar Memorias de un informático (Lorenzo) avatar volkan avatar Alexander Inglessi avatar  avatar Jakob avatar  avatar Konstantin Varik avatar  avatar Alexzander thunder Shevchenko avatar Tormi Tabor avatar Andrej Shadura avatar Volodymyr Agafonkin avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Forkers

lauralouu velocat

geoalbum's Issues

Issue with negative latitudes

Hey I was inserting a negative latitude and the Lettermarker and PanTo Function did not work. I found the line in question (geoalbum.js, line 61):

if( lat > 0 ) {
            pageMarkersLayer.addLayer(L.letterMarker([lat, lon], idx)
                .on('click', function() { window.location.hash = idx}));
        }

so I changed this to if (lat !== 0) and it works fine.

Just wanted to let you know. Thanks for the code. Love to work with it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.