✨ 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
42 lines
1.5 KiB
JavaScript
42 lines
1.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.JSONP = void 0;
|
|
const polling_1 = require("./polling");
|
|
const qs = require("querystring");
|
|
const rDoubleSlashes = /\\\\n/g;
|
|
const rSlashes = /(\\)?\\n/g;
|
|
class JSONP extends polling_1.Polling {
|
|
/**
|
|
* JSON-P polling transport.
|
|
*/
|
|
constructor(req) {
|
|
super(req);
|
|
this.head = "___eio[" + (req._query.j || "").replace(/[^0-9]/g, "") + "](";
|
|
this.foot = ");";
|
|
}
|
|
onData(data) {
|
|
// we leverage the qs module so that we get built-in DoS protection
|
|
// and the fast alternative to decodeURIComponent
|
|
data = qs.parse(data).d;
|
|
if ("string" === typeof data) {
|
|
// client will send already escaped newlines as \\\\n and newlines as \\n
|
|
// \\n must be replaced with \n and \\\\n with \\n
|
|
data = data.replace(rSlashes, function (match, slashes) {
|
|
return slashes ? match : "\n";
|
|
});
|
|
super.onData(data.replace(rDoubleSlashes, "\\n"));
|
|
}
|
|
}
|
|
doWrite(data, options, callback) {
|
|
// we must output valid javascript, not valid json
|
|
// see: http://timelessrepo.com/json-isnt-a-javascript-subset
|
|
const js = JSON.stringify(data)
|
|
.replace(/\u2028/g, "\\u2028")
|
|
.replace(/\u2029/g, "\\u2029");
|
|
// prepare response
|
|
data = this.head + js + this.foot;
|
|
super.doWrite(data, options, callback);
|
|
}
|
|
}
|
|
exports.JSONP = JSONP;
|