A modern Angular Material application for tracking terminal locations and daily shipping destinations, designed to replace Google My Maps with enhanced functionality.
- Interactive Google Maps with custom markers
- Location Search & Autocomplete - Search for any location with smart suggestions
- Layer Management - Toggle terminals and shipping destinations
- Terminal Filtering - Filter shipping locations by terminal
- Responsive Design with Material Design UI
- KML Import/Export - Import your existing Google My Maps data
- Real-time Statistics - View summary data and counts
- Detailed Info Windows - Rich information display for each location
# Install Node.js (16+ recommended)
# Install Angular CLI
npm install -g @angular/cli# Create new Angular project
ng new terminal-maps --routing=true --style=scss
# Navigate to project directory
cd terminal-maps
# Install dependencies
npm install @angular/material @angular/cdk @angular/animations
npm install @angular/google-maps
npm install @types/google.maps# Add Angular Material
ng add @angular/material
# Choose Indigo/Pink theme
# Set up global typography styles: Yes
# Include browser animations: YesSee ENVIRONMENT_SETUP.md for detailed configuration instructions.
Quick setup:
- Get a Google Maps API key from Google Cloud Console
- Enable the Maps JavaScript API
- Add your API key to
src/environments/environment.ts:
export const environment = {
production: false,
googleMapsApiKey: 'YOUR_API_KEY_HERE'
};Replace the generated files with the provided code:
src/
├── app/
│ ├── app.component.ts
│ ├── app.component.html
│ ├── app.component.scss
│ ├── app.module.ts
│ └── app.component.spec.ts
├── index.html
├── main.ts
└── styles.scss
@import '@angular/material/prebuilt-themes/indigo-pink.css';
html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
// Custom snackbar styles
.terminal-snackbar {
background-color: #c2185b !important;
color: white !important;
}
.shipping-snackbar {
background-color: #1a237e !important;
color: white !important;
}# Development server
ng serve
# Production build
ng build --prod-
Export your Google My Maps data:
- Open your Google My Maps
- Click the 3-dot menu next to your map title
- Select "Export to KML/KMZ"
- Choose KML format and download
-
Import into the app:
- Click the upload icon in the toolbar
- Select your KML file
- The app will automatically parse terminals and shipping locations
- Terminal Locations: Shows all terminal facilities with detailed information
- Daily Shipping Destinations: Shows where inventory is being shipped
- Select a specific terminal to view only its shipping destinations
- Clear selection to view all shipping locations
- Click terminals to see detailed facility information
- Click shipping locations to see shipment counts and source terminal
- Use toolbar buttons to center map on different data types
- Export current data as JSON for backup
- Import KML files from Google My Maps
- Real-time statistics in the sidebar
To add new fields to terminals or shipping locations:
- Update the TypeScript interfaces in
app.component.ts - Modify the KML parsing logic in the
parseKML()method - Update the info window templates in
app.component.html - Add new fields to the sidebar display
- Modify colors in the
layersarray inapp.component.ts - Update CSS classes in
app.component.scss - Change Material theme in
styles.scss
- Add new map styles to the
mapStylesarray - Include custom Google Maps styling JSON
interface Terminal {
id: string;
name: string;
terminalNumber: string;
address: string;
city: string;
state: string;
zip: string;
phone: string;
manager: string;
drivers: number;
shop: number;
other: number;
total: number;
opened: string;
shopBays: string;
facilityType: string;
primaryShippers: string;
position: google.maps.LatLngLiteral;
}interface ShippingLocation {
id: string;
name: string;
terminalSource: string;
city: string;
state: string;
count: number;
position: google.maps.LatLngLiteral;
}ng serve
# App runs on http://localhost:4200ng build
# Creates production files in dist/terminal-maps/See NETLIFY_SETUP.md for complete deployment guide.
Quick steps:
- Set
GOOGLE_MAPS_API_KEYenvironment variable in Netlify - Push to GitHub
- Netlify auto-deploys with the configured
netlify.toml
See ENVIRONMENT_SETUP.md for detailed environment setup.
The application uses environment files for configuration:
- Development:
src/environments/environment.ts - Production:
src/environments/environment.prod.ts(auto-configured by Netlify)
- Google Maps not loading: Check API key and enabled APIs
- KML import errors: Ensure KML file follows the expected structure
- Marker clustering: For large datasets, consider implementing marker clustering
- Performance: Use OnPush change detection for large marker sets
- Chrome 80+
- Firefox 75+
- Safari 13+
- Edge 80+
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.