This guide will help you set up and run the aggregation-viewer-client-feature-layer application.
- Web Server - Any HTTP server (Apache, Nginx, IIS, or simple development server)
- Modern Web Browser - Chrome 60+, Firefox 55+, Safari 11+, Edge 79+
- Internet Connection - Required for ArcGIS JavaScript API and basemap services
- ArcGIS JavaScript API 3.46 - Loaded via CDN
- Font Awesome - Loaded via CDN for icons
- Dojo Framework - Included with ArcGIS JS API
-
Clone or Download the Repository
git clone <repository-url> cd aggregation-viewer-client-feature-layer
-
Start a Local Web Server
Using Python 3:
python -m http.server 8000
Using Python 2:
python -m SimpleHTTPServer 8000
Using Node.js (if you have it installed):
npx http-server -p 8000
Using PHP:
php -S localhost:8000
-
Access the Application Open your browser and navigate to:
http://localhost:8000
-
Copy Files to Web Directory
cp -r aggregation-viewer-client-feature-layer/ /var/www/html/
-
Set Permissions (Linux/Mac)
chmod -R 755 /var/www/html/aggregation-viewer-client-feature-layer/
-
Access the Application Navigate to:
http://localhost/aggregation-viewer-client-feature-layer/
-
Copy Files to IIS Directory Copy the project folder to
C:\inetpub\wwwroot\ -
Configure IIS Site
- Open IIS Manager
- Create new site pointing to the project directory
- Set appropriate permissions
-
Access the Application Navigate to your configured IIS site URL
The application comes with default configuration:
- Default Layer: FAA airports service
- Default Basemap: Topographic
- Default Spatial Reference: Web Mercator (102100)
- Default LOD: 3
Edit index.html and modify the default URL:
value="https://your-service-url/MapServer/0"If you encounter CORS issues, add your server to the allowed origins in index.html:
esri.config.defaults.io.corsEnabledServers.push('https://your-server.com');- Map Loads: Verify the map displays with the default basemap
- Layer Loading: Test loading the default FAA airports layer
- Aggregation: Try different aggregation types (Square, Hexagon, etc.)
- Basemap Switching: Test switching between different basemaps
- Time Slider: If temporal data is available, test the time slider functionality
- Cause: CORS restrictions or network connectivity
- Solution: Check browser console for errors, verify internet connection
- Cause: Invalid service URL or service unavailable
- Solution: Verify the service URL is accessible and supports aggregation queries
- Cause: Missing CSS files or incorrect paths
- Solution: Verify all CSS files are present in the
flat/directory
- Cause: ArcGIS API loading issues
- Solution: Check internet connection and CDN availability
- Chrome 60+
- Firefox 55+
- Safari 11+
- Edge 79+
- Internet Explorer 11 (with polyfills)
- iOS Safari 11+
- Chrome Mobile 60+
- Samsung Internet 7+
For production deployment, ensure:
- Use HTTPS for all external service calls
- Configure proper SSL certificates
- Update service URLs to use HTTPS endpoints
Consider implementing CSP headers:
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' https://js.arcgis.com https://use.fontawesome.com;">- Enable Gzip Compression on your web server
- Set Proper Cache Headers for static assets
- Use CDN for faster asset delivery
- Minify CSS/JS if making custom modifications
- Use appropriate LOD levels for your data scale
- Consider server-side caching for frequently accessed aggregations
- Monitor network requests and optimize query parameters
Add debug parameters to see detailed logging:
// Add to your JavaScript console
esri.config.defaults.io.corsDetection = false;Use browser developer tools to monitor:
- Failed HTTP requests
- CORS errors
- Service response times
- JavaScript console errors
- "Unable to load service": Check service URL and network connectivity
- "CORS error": Add service domain to CORS enabled servers
- "Projection failed": Verify spatial reference compatibility
For additional support, check the browser console for detailed error messages and refer to the ArcGIS JavaScript API documentation.