Comments (3)
For the purpose of development, the desired behavior is:
- A style JSON (we'll call it americana.json) is generated at compile time and posted to gh-pages where it is used in favor of the currently dynamically generated object.
- Code for generating the style is located in separate folders from the code needed for style runtime (i.e. for shield loading)
- Documentation is added that's sufficient for a style user to host their own copy, including shields. The Americana runtime would include compiled sprites, the style JSON, and a javascript library for dynamic shield generation.
from openstreetmap-americana.
Yes, it is possible to generate a style.json. In the following location, the americanaLayers object contains all the style, and you could use JSON.stringify() to turn it into a standalone JSON object. We are planning to create a generated JSON version of the style for deployment so that each client doesn't have to generate the style each time.
openstreetmap-americana/style/americana.js
Line 178 in f8d9f16
However, there is a big update to add concurrent highway shields that's in the works. That update will depend on the styleimagemissing
hook to generate highway shields, rather than the icon-based version that is currently in the map (which only supports single shields). So, you'd still need to hook into javascript to do shield generation even with a separate style.json. The concurrent shield work in progress can be found here:
https://github.com/ZeLonewolf/openstreetmap-americana/tree/openmaptilers-new-features-test
from openstreetmap-americana.
Thanks a lot, I wasn't aware of the shield issue, so I will wait a bit before actually trying to host the style on my server :)
from openstreetmap-americana.
Related Issues (20)
- National Historic Trail auto tour routes HOT 13
- Shields of the Dominican Republic
- Faroe Islands shields HOT 2
- Shields for Guernsey, Jersey and the Isle of Man HOT 1
- Shields of Malta
- Shields of Denmark
- Shields of Norway HOT 9
- Shields of Andorra
- Shields for the State of Mexico
- Norwegian names and language codes HOT 4
- Move this repo to the osm-americana organization HOT 7
- Make Americana an OSM US-supported project HOT 7
- Distinguish overlapping protected areas HOT 6
- Courthouses
- Campgrounds and potential new POI color HOT 1
- Change links from zelonewolf.github.io to americanamap.org
- random line in Gulf of Mexico HOT 2
- Additional Shields of Mexico City HOT 1
- Add shields for unorganized territory roads in Minnesota HOT 2
- Add option to print or export vector graphics
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 openstreetmap-americana.