✨ 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
71 lines
2.4 KiB
JavaScript
71 lines
2.4 KiB
JavaScript
import next from "../next";
|
|
let initializations = {};
|
|
let sandboxContext;
|
|
let requireCacheHotReloader;
|
|
if (process.env.NODE_ENV !== "production") {
|
|
sandboxContext = require("../web/sandbox/context");
|
|
requireCacheHotReloader = require("../../build/webpack/plugins/nextjs-require-cache-hot-reloader");
|
|
}
|
|
export function clearAllModuleContexts() {
|
|
return sandboxContext == null ? void 0 : sandboxContext.clearAllModuleContexts();
|
|
}
|
|
export function clearModuleContext(target) {
|
|
return sandboxContext == null ? void 0 : sandboxContext.clearModuleContext(target);
|
|
}
|
|
export function deleteAppClientCache() {
|
|
return requireCacheHotReloader == null ? void 0 : requireCacheHotReloader.deleteAppClientCache();
|
|
}
|
|
export function deleteCache(filePaths) {
|
|
for (const filePath of filePaths){
|
|
requireCacheHotReloader == null ? void 0 : requireCacheHotReloader.deleteCache(filePath);
|
|
}
|
|
}
|
|
export async function propagateServerField(dir, field, value) {
|
|
const initialization = await initializations[dir];
|
|
if (!initialization) {
|
|
throw new Error("Invariant cant propagate server field, no app initialized");
|
|
}
|
|
const { app } = initialization;
|
|
let appField = app.server;
|
|
if (appField) {
|
|
if (typeof appField[field] === "function") {
|
|
await appField[field].apply(app.server, Array.isArray(value) ? value : []);
|
|
} else {
|
|
appField[field] = value;
|
|
}
|
|
}
|
|
}
|
|
async function initializeImpl(opts) {
|
|
const type = process.env.__NEXT_PRIVATE_RENDER_WORKER;
|
|
if (type) {
|
|
process.title = "next-render-worker-" + type;
|
|
}
|
|
let requestHandler;
|
|
let upgradeHandler;
|
|
const app = next({
|
|
...opts,
|
|
hostname: opts.hostname || "localhost",
|
|
customServer: false,
|
|
httpServer: opts.server,
|
|
port: opts.port,
|
|
isNodeDebugging: opts.isNodeDebugging
|
|
});
|
|
requestHandler = app.getRequestHandler();
|
|
upgradeHandler = app.getUpgradeHandler();
|
|
await app.prepare(opts.serverFields);
|
|
return {
|
|
requestHandler,
|
|
upgradeHandler,
|
|
app
|
|
};
|
|
}
|
|
export async function initialize(opts) {
|
|
// if we already setup the server return as we only need to do
|
|
// this on first worker boot
|
|
if (initializations[opts.dir]) {
|
|
return initializations[opts.dir];
|
|
}
|
|
return initializations[opts.dir] = initializeImpl(opts);
|
|
}
|
|
|
|
//# sourceMappingURL=render-server.js.map
|