@xuehongbo/map-craft-js v0.0.5
Project Name: MapCraftJS
Project Description (Under Development!!!)
MapCraftJS is a powerful and flexible open-source JavaScript library designed to simplify the creation and manipulation of interactive maps. With MapCraftJS, developers can easily integrate dynamic map functionality into their applications, providing users with a map experience that they can view, annotate, and interact with based on custom configurations.
Supported Maps
- AMap
- Baidu Maps
- SiJi Maps (Dedicated map for State Grid, supports internal network deployment)
- Nanwang Zhi Kan (Dedicated map for Southern Power Grid, supports internal network deployment)
Main Features
SiJi Maps & Nanwang Zhi Kan
Line drawing support
Fault section rendering
Fault point marking
Fault impact distribution transformer analysis
Power restoration area analysis
Fault impact customer analysis
Custom map creation: Easily generate different types of maps using a wide range of configuration options. Supports multiple map providers and formats, ensuring flexibility to meet the needs of various projects.
Drawing and annotation: Allows users to draw lines, add points, and annotations on the map. The library supports multiple drawing tools and styles, providing a rich and interactive experience.
Customizable layers: Add and manage multiple map layers, including vector layers and raster layers. Customize the visibility and style of layers to meet the needs of the application.
Extensible API: Utilize a comprehensive API for advanced customization and integration. Extend the library's capabilities through plugins and modules to meet specific project needs.
Quick Start
To get started with MapCraftJS, include the library in your project and set up your first map following the quick start guide. Detailed documentation and examples are provided to help you fully utilize the library's capabilities.
Installation
You can install MapCraftJS via npm or include the library directly in your HTML:
npm i @xuehongbo/map-craft-js
Usage
import MapCraft from '@xuehongbo/map-craft-js'
// 地图初始化参数
const mapOptions = {
//地图类型 AMap:高德 BMap:百度地图
type: 'AMap',
security: {
code: '',
key: ''
},
//地图容器
mapContainer: 'app',
//地图风格
mapType: 'satellite',
//地图缩放层级
zoom: 22,
center: [116.39, 39.9],
//地图版本
version: '2.0',
};
const map = new MapCraft(mapOptions)
Documentation
For detailed documentation, including API reference, tutorials, and example usage, please visit the MapCraftJS documentation (not yet written).
License
MapCraftJS is released under the MIT license. Under the terms of the license, you are free to use, modify, and distribute the library.