Comments (3)
I think the options are:
- The current way - maintain an osm2pgsql database on a database server, and keep it up to date using osmosis and osm2pgsql. Generate the data files periodically and up-load them to web server.
Pros: Simple, if database server crashes, web front end continues to work using latest available data.
Cons: Does not scale well - one file per layer would get big if we try to run map for larger area, or for higher density features. - Use Mapnik2 'MetaWriter' to generate image tiles for the map, but provide a data file for each tile to provide the interactive part of the map (data in popups). Use tilecache to upload tiles and metadata from database server to web server.
Pros: Server side simple for static data - will need work to deal with expiry of tiles and meta-data.
Cons: I think we will need a Leaflet plug-in to retrieve the meta-data each time a tile is downloaded, then add the data to the icon layer groups. - Run an instance of xapi and have Leaflet generate an xapi query each time a tile is loaded to obtain the information.
Pros: jxapi will be supported so should be able to get it running.
Cons: Can not run jxapi on web server, so will be limited by upload speed of my internet connection to the database server, so could seem slow from a users point of view. - Use database server to obtain diffs using osmosis and generate sql to keep a mysql database up to date on the web server.
Pros - should be fast for the users because it uses the mysql server on the web server.
Cons - will need a Leaflet plugin to obtain the data as tiles are loaded. Will need to develop the code to keep the mysql database up to date.
I think the options for scalability using our current hardware are 2 (mapnik metawriters) or 4 (mysql database on web server).
I would quite like to get the mysql version working, but the mapnik route will be the easiest. What do you think?
from brewmap.
I am minded to have a go at mapnik metawriters (http://sotm-eu.org/slides/58_HermannKraus_vortrag.pdf). I could make a set of transparent tiles with just small icons for the BrewMap features, and json files corresponding to each map tile.
Then it is just a matter of getting the javascript side working. Will give that a bit of thought tomorrow evening.
from brewmap.
Actually, I have been thinking some more - we do not actually need raster tiles produced by mapnik, so an Option 5 would be to use TileCache (http://tilecache.org) with a new backend - rather than a module that calls mapnik to produce a png of a particular area, it could query the database and produce a json file for a particular area - the json files would then be cached so they are quick to access next time. Still need the same client code to download the json each time a tile is downloaded and add the data to the map.
from brewmap.
Related Issues (20)
- Is the edit button necessary? HOT 2
- JSON data contains keys with null values HOT 3
- Render 'industrial=brewery' rather than 'industry=brewery' HOT 6
- Server code does not read BrewMapCfg.json file
- Map Key is not generated automatically HOT 1
- Statistics Box on main Page is emtpy
- Statistics should be shown as a table to make it neater. HOT 1
- Add layer selector HOT 4
- Improve Microbrewery Icon HOT 4
- Type in popup incorrect HOT 1
- Web Page Layout Percentage Size HOT 2
- Multiple values HOT 1
- Vineyards HOT 1
- Adding support for relations HOT 5
- Use geoJSON for data file format HOT 2
- Show tagQueries on a Map
- Cluster icons to de-clutter map. HOT 3
- Make code more Abstract HOT 1
- Attribution HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brewmap.