Skip to content

webful-ltd/occupied-city

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Occupied City

This is the codebase for Occupied City. It uses AngularJS 1.8.

The site lives at occupied.city and is released as open source under the MIT Licence.

Try it out

  • npm i
  • npm run build:dev
  • Visit a web server pointed to ./web

Issues

Issues are tracked on GitHub.

Mapping

We currently use Leaflet for maps with angular-leaflet-directive. Tiles come from the default provider, OpenStreetMap.

City outlines

We're using Flickr Shapefiles locality data to produce approximate outlines for each included city. Currently the coordinates are manually copy/pasted from their GeoJSON file and included in our service data. Cities without a coords key will use their area and draw a circle instead of the real city shape.

Some of the resulting shapes are a slightly weird representation of the city, but I've not yet found a better data source covering the whole world with enough detail to include cities the size of (say) Liverpool. It would be good to stick to one consistent source and process for all cities. Do you know of a better place to get outline GeoJSON? Let me know!

Country outlines

As Flickr shapes were even more noticeably off for at least some countries, we use these approximations instead.

Dependencies

Client libraries managed with npm.

Live builds

There is no CI for now. To build live after uploading src files:

`npm i`
`npm run build`

Webpack'd output is placed in and served from ./web.

Requirements

  • Node 14+ for build
  • Apache 2.4+

Tests

Tests were few before and e2e's relied on the now-deprecated Protractor framework.

In the interests of keeping the app maintainable and secure in the medium term without burning hours on this, tests were therefore removed in 2022. We should write new ones if we want to do significant work on the app again.

Apache virtual host configuration

To use 'HTML5 mode' requires a special vhost setup. This is copied at build time from src and the path depends on whether you use build:dev (currently hard-coded to Noel's local file structure) or build.

Possible sources

Some potential sources for additional research & data: