square-phonePeak Zone Map

1. Peak Zone Map Overview

The Peak Zone Map provides a real-time visual overview of all active peak pricing areas within the gocab admin system. Admins can monitor peak zones, surge pricing behavior, and polygon boundaries directly on an interactive map.


2. Map Interface Features

2.1 Zone Boundaries

  • Displays polygon shapes representing peak zone coverage areas

  • Supports multiple overlapping polygons

  • Uses color coding to differentiate:

    • Regular zones

    • Active peak zones (highlighted in orange)

2.2 Surge Pricing Indicators

  • When a ride begins inside a peak zone, the system highlights:

    • Surge multiplier

    • Peak zone name

    • Applicable charges

2.3 Real-time Updates

  • Peak zone changes appear instantly:

    • Creation

    • Expiration

    • Updates


3. Example – Peak Zone Map Visualization


circle-info

Map Marker Information

  • Active peak zones highlighted with orange polygons

  • Clicking inside a zone reveals:

    • Surge multiplier

    • Zone details

    • Remaining active duration

  • Ride start points show surge amount if applicable


5. Technical Implementation Details

5.1 Key Components

File
Purpose

PeakZoneTrait.php

Contains logic for creation, detection, and validation of peak zones

PeakZone.php

ORM model representing a peak zone

RideRepository.php

Calculates surge pricing when a ride starts

Zone.php

Base zone model including peak surge configuration


6. Database Structure

Important Tables & Columns

rides Table

Column
Description

peak_zone_id

Foreign key linking to peak_zones table

peak_zone_charge

Surge amount applied for the specific ride

peak_zones Table

Column
Description

name

Name of the peak zone

polygon_points

JSON polygon coordinates defining the zone

zones Table

Column
Description

peak_price_increase_percentage

Surge multiplier for the zone

circle-exclamation

7. System Monitoring & Maintenance

Monitoring

  • Peak zone creation & deletion logs

  • Surge earnings tracked separately

  • Performance metrics collected continuously

Maintenance

  • Automatic removal of expired peak zones

  • Routine geospatial index optimization

  • Regular validation of configuration values

circle-exclamation

Last updated