An open API service indexing awesome lists of open source software.

https://github.com/snappey/foxhole-map

It's a simple map that shows the state of a Foxhole War (works for all shards)
https://github.com/snappey/foxhole-map

angular foxhole interactive-map openlayers

Last synced: 8 months ago
JSON representation

It's a simple map that shows the state of a Foxhole War (works for all shards)

Awesome Lists containing this project

README

          

# Interactive Foxhole Map

A comprehensive interactive map for [Foxhole](https://www.foxholegame.com/) using OpenLayers and the Official Foxhole API for live data.

Deployed [here](https://foxhole-map-pcayj.ondigitalocean.app/) for now.

## Features

### πŸ—ΊοΈ **Map & Data**
- **Full map visualization** with minimal performance issues (hopefully)
- **Multi-shard support** - Select between Able, Baker, or Charlie shards
- **Live data integration** - Real-time updates from Official Foxhole API
- **Victory point tracking** - Shows current VP counts and requirements for victory
- **Complete structure catalog** - All in-game structures including bases, resource fields, factories, and more
- **Drawing tools** - Create custom markers and annotations on the map

## What does it look like?

![Foxhole Map](./assets/example.jpg)

## Keyboard Shortcuts

| Key | Action |
|-----|--------|
| `?` (Shift+/) | Show keyboard shortcuts |
| `R` | Reset map layers to defaults |
| `1-7` | Toggle layer groups (Overview, Logistics, Production, Defense, Intelligence, Heavy Weapons, Hex Sectors) |

## Development

### Prerequisites
- Node.js 18+
- Angular CLI 19+

### Getting Started
```bash
# Install dependencies
npm install

# Start development server
npm start

# Build for production
npm run build
# Outputs at ./dist

```

### Project Structure
```
src/
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ map/ # Main map component
β”‚ β”œβ”€β”€ drawing-toolbar/ # Drawing tools UI
β”‚ β”œβ”€β”€ layer-groups-toolbar/ # Layer management UI
β”‚ β”œβ”€β”€ hotkey-display/ # Keyboard shortcuts display
β”‚ └── map-info/ # War info and VP display
β”œβ”€β”€ services/
β”‚ β”œβ”€β”€ war-api.service.ts # API integration with caching
β”‚ β”œβ”€β”€ drawing.service.ts # Drawing functionality
β”‚ β”œβ”€β”€ hotkey.service.ts # Keyboard shortcuts
β”‚ └── layer-groups.service.ts # Layer management
β”œβ”€β”€ layers/ # OpenLayers layer services
β”œβ”€β”€ config/ # Configuration files
└── assets/ # Static assets and icons
```

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## Acknowledgments

- [Foxhole](https://www.foxholegame.com/) by Siege Camp, icons, assets, and the game
- [OpenLayers](https://openlayers.org/) for the mapping library
- [Angular](https://angular.io/) for the framework
- [PrimeNG](https://primeng.org/) for UI components