🎯 MapView v2.0 - Global Deployment Ready

 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
This commit is contained in:
2025-07-20 19:52:16 +07:00
parent 3203463a6a
commit c65cc97a33
64624 changed files with 7199453 additions and 6462 deletions

View File

@@ -0,0 +1,10 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Rule } from '@angular-devkit/schematics';
import { Schema } from './schema';
export default function (options: Schema): Rule;

View File

@@ -0,0 +1,79 @@
"use strict";
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@angular-devkit/core");
const schematics_1 = require("@angular-devkit/schematics");
const tasks_1 = require("@angular-devkit/schematics/tasks");
function addSchematicToCollectionJson(collectionPath, schematicName, description) {
return (tree) => {
const collectionJson = tree.readJson(collectionPath);
if (!(0, core_1.isJsonObject)(collectionJson) || !(0, core_1.isJsonObject)(collectionJson.schematics)) {
throw new Error('Invalid collection.json; schematics needs to be an object.');
}
collectionJson['schematics'][schematicName] = description;
tree.overwrite(collectionPath, JSON.stringify(collectionJson, undefined, 2));
};
}
function default_1(options) {
const schematicsVersion = require('@angular-devkit/schematics/package.json').version;
const coreVersion = require('@angular-devkit/core/package.json').version;
// Verify if we need to create a full project, or just add a new schematic.
return (tree, context) => {
if (!options.name) {
throw new schematics_1.SchematicsException('name option is required.');
}
let collectionPath;
try {
const packageJson = tree.readJson('/package.json');
if (typeof packageJson.schematics === 'string') {
const p = (0, core_1.normalize)(packageJson.schematics);
if (tree.exists(p)) {
collectionPath = p;
}
}
}
catch { }
let source = (0, schematics_1.apply)((0, schematics_1.url)('./schematic-files'), [
(0, schematics_1.applyTemplates)({
...options,
coreVersion,
schematicsVersion,
dot: '.',
camelize: core_1.strings.camelize,
dasherize: core_1.strings.dasherize,
}),
]);
// Simply create a new schematic project.
if (!collectionPath) {
collectionPath = (0, core_1.normalize)('/' + options.name + '/src/collection.json');
source = (0, schematics_1.apply)((0, schematics_1.url)('./project-files'), [
(0, schematics_1.move)('package.json', 'package.json.template'),
(0, schematics_1.applyTemplates)({
...options,
coreVersion,
schematicsVersion,
dot: '.',
camelize: core_1.strings.camelize,
dasherize: core_1.strings.dasherize,
}),
(0, schematics_1.mergeWith)(source),
(0, schematics_1.move)(options.name),
]);
context.addTask(new tasks_1.NodePackageInstallTask(options.name));
}
return (0, schematics_1.chain)([
(0, schematics_1.mergeWith)(source),
addSchematicToCollectionJson(collectionPath, core_1.strings.dasherize(options.name), {
description: 'A blank schematic.',
factory: './' + core_1.strings.dasherize(options.name) + '/index#' + core_1.strings.camelize(options.name),
}),
]);
};
}
exports.default = default_1;

View File

@@ -0,0 +1,19 @@
# Outputs
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
# IDEs
.idea/
jsconfig.json
.vscode/
# Misc
node_modules/
npm-debug.log*
yarn-error.log*
# Mac OSX Finder files.
**/.DS_Store
.DS_Store

View File

@@ -0,0 +1,4 @@
# Ignores TypeScript files, but keeps definitions.
*.ts
!*.d.ts

View File

@@ -0,0 +1,28 @@
# Getting Started With Schematics
This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
### Testing
To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.
Check the documentation with
```bash
schematics --help
```
### Unit Testing
`npm run test` will run the unit tests, using Jasmine as a runner and test framework.
### Publishing
To publish, simply do:
```bash
npm run build
npm publish
```
That's it!

View File

@@ -0,0 +1,25 @@
{
"name": "<%= dasherize(name) %>",
"version": "0.0.0",
"description": "A blank schematics",
"scripts": {
"build": "tsc -p tsconfig.json",
"test": "npm run build && jasmine src/**/*_spec.js"
},
"keywords": [
"schematics"
],
"author": "<%= author %>",
"license": "MIT",
"schematics": "./src/collection.json",
"dependencies": {
"@angular-devkit/core": "^<%= coreVersion %>",
"@angular-devkit/schematics": "^<%= schematicsVersion %>",
"typescript": "~5.4.2"
},
"devDependencies": {
"@types/node": "^18.18.0",
"@types/jasmine": "~5.1.0",
"jasmine": "^5.0.0"
}
}

View File

@@ -0,0 +1,4 @@
{
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {}
}

View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"baseUrl": "tsconfig",
"lib": ["es2018", "dom"],
"declaration": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"rootDir": "src/",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"target": "es6",
"types": ["jasmine", "node"]
},
"include": ["src/**/*"],
"exclude": ["src/*/files/**/*"]
}

View File

@@ -0,0 +1,11 @@
export interface Schema {
/**
* Author for the new schematic.
*/
author?: string;
/**
* The package name for the new schematic.
*/
name?: string;
[property: string]: any;
}

View File

@@ -0,0 +1,4 @@
"use strict";
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsSchematicSchema",
"title": "Schematic Options Schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The package name for the new schematic.",
"$default": {
"$source": "argv",
"index": 0
}
},
"author": {
"type": "string",
"description": "Author for the new schematic."
}
},
"required": []
}

View File

@@ -0,0 +1,10 @@
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
// You don't have to export the function as default. You can also have more than one rule factory
// per file.
export function <%= camelize(name) %>(_options: any): Rule {
return (tree: Tree, _context: SchematicContext) => {
return tree;
};
}

View File

@@ -0,0 +1,14 @@
import { Tree } from '@angular-devkit/schematics';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import * as path from 'path';
const collectionPath = path.join(__dirname, '../collection.json');
describe('<%= dasherize(name) %>', () => {
it('works', async () => {
const runner = new SchematicTestRunner('schematics', collectionPath);
const tree = await runner.runSchematic('<%= dasherize(name) %>', {}, Tree.empty());
expect(tree.files).toEqual([]);
});
});