✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
65 lines
1.7 KiB
JavaScript
65 lines
1.7 KiB
JavaScript
'use strict'
|
|
|
|
const Client = require('./client')
|
|
const defaults = require('./defaults')
|
|
const Connection = require('./connection')
|
|
const Result = require('./result')
|
|
const utils = require('./utils')
|
|
const Pool = require('pg-pool')
|
|
const TypeOverrides = require('./type-overrides')
|
|
const { DatabaseError } = require('pg-protocol')
|
|
const { escapeIdentifier, escapeLiteral } = require('./utils')
|
|
|
|
const poolFactory = (Client) => {
|
|
return class BoundPool extends Pool {
|
|
constructor(options) {
|
|
super(options, Client)
|
|
}
|
|
}
|
|
}
|
|
|
|
const PG = function (clientConstructor) {
|
|
this.defaults = defaults
|
|
this.Client = clientConstructor
|
|
this.Query = this.Client.Query
|
|
this.Pool = poolFactory(this.Client)
|
|
this._pools = []
|
|
this.Connection = Connection
|
|
this.types = require('pg-types')
|
|
this.DatabaseError = DatabaseError
|
|
this.TypeOverrides = TypeOverrides
|
|
this.escapeIdentifier = escapeIdentifier
|
|
this.escapeLiteral = escapeLiteral
|
|
this.Result = Result
|
|
this.utils = utils
|
|
}
|
|
|
|
if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') {
|
|
module.exports = new PG(require('./native'))
|
|
} else {
|
|
module.exports = new PG(Client)
|
|
|
|
// lazy require native module...the native module may not have installed
|
|
Object.defineProperty(module.exports, 'native', {
|
|
configurable: true,
|
|
enumerable: false,
|
|
get() {
|
|
let native = null
|
|
try {
|
|
native = new PG(require('./native'))
|
|
} catch (err) {
|
|
if (err.code !== 'MODULE_NOT_FOUND') {
|
|
throw err
|
|
}
|
|
}
|
|
|
|
// overwrite module.exports.native so that getter is never called again
|
|
Object.defineProperty(module.exports, 'native', {
|
|
value: native,
|
|
})
|
|
|
|
return native
|
|
},
|
|
})
|
|
}
|