Dublin Crime Map Plugin
A WordPress plugin that displays crime reports on Google Maps for the Dublin area, helping people stay aware of crime hotspots and report incidents.
Features
– **Interactive Google Map**: Display crime reports with color-coded markers
– **Crime Reporting**: Allow users to submit crime reports with location data
– **Admin Management**: Review, approve, and manage crime reports
– **Real-time Updates**: AJAX-powered form submissions and map updates
– **Responsive Design**: Works on desktop and mobile devices
– **Location Services**: Address autocomplete and map click-to-select location
– **Verification System**: Mark reports as verified for credibility
Installation
1. Upload the `dublin-crime-map` folder to your `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Go to ‘Crime Map’ in your WordPress admin menu
4. Configure your Google Maps API key in Settings
Shortcodes
Display the crime map with report form:**
Report a Crime
📍 Crime Type Color Reference
💡 Tip: Each crime type has a unique color on the map. Click the “Show Legend” button on the map for a detailed reference.
**Display only the crime map:**
**Display only the report form:**
📍 Crime Type Color Reference
💡 Tip: Each crime type has a unique color on the map. Click the “Show Legend” button on the map for a detailed reference.
Admin Features
1. **Dashboard**: View statistics and recent reports
2. **Crime Reports**: Manage all submitted reports
3. **Settings**: Configure Google Maps API and map settings
Crime Types
The plugin includes these default crime types:
– Assault
– Robbery
– Theft
– Vandalism
– Harassment
– Drug Activity
– Other
You can customize these in the admin settings.
Database Structure
The plugin creates a table `wp_dublin_crime_reports` with the following fields:
– `id`: Unique report ID
– `title`: Report title
– `description`: Detailed description
– `crime_type`: Type of crime
– `latitude`/`longitude`: GPS coordinates
– `address`: Human-readable address
– `incident_date`: When the incident occurred
– `reporter_name`/`email`/`phone`: Reporter contact info
– `status`: pending/approved/rejected
– `is_verified`: Whether the report is verified
– `created_at`/`updated_at`: Timestamps
Security Features
– Nonce verification for AJAX requests
– Input sanitization and validation
– Capability checks for admin functions
– Location validation (Dublin area bounds)
– Anonymous reporting option
Customization
Styling
Modify the CSS files in the `assets/` directory:
– `frontend.css`: Public-facing styles
– `admin.css`: Admin interface styles
JavaScript
Customize functionality in:
– `frontend.js`: Map interactions and form handling
– `admin.js`: Admin interface enhancements
Crime Types
Add or modify crime types in the plugin settings or directly in the database.
Requirements
– WordPress 5.0 or higher
– PHP 7.4 or higher
– Google Maps API Key
– SSL certificate (recommended for production)
Support
For support and feature requests, please contact the plugin developer.
License
This plugin is licensed under the GPL v2 or later.
Changelog
Version 1.0.0
– Initial release
– Google Maps integration
– Crime reporting system
– Admin management interface
– Responsive design
