# tencent-map

> 腾讯地图 支持vue版 可用于手机端和pc端

Latest version **1.0.2** (published 2020-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install tencent-map
pnpm add tencent-map
yarn add tencent-map
bun add tencent-map
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-05-26 |
| First published | 2020-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jared.Yan |
| Maintainers | fuile |
| Keywords | qqmap, tencentmap, QQ地图, 腾讯地图 |

## Links

- npm: https://www.npmjs.com/package/tencent-map
- Repository: https://github.com/fuile/tencent-map
- Homepage: https://github.com/fuile/tencent-map#readme
- Issues: https://github.com/fuile/tencent-map/issues
- npm.io page: https://npm.io/package/tencent-map

## Recent versions

- 1.0.2 (latest) — 2020-05-26
- 1.0.1 — 2020-03-23
- 1.0.0 — 2020-03-23

## README

腾讯地图 
--------
- Support the VUE
- It can be used on mobile phone or PC

#### Usage
1. npm i tencent-map -S
2. import TencentMap from "tencent-map";
3. TencentMap.load(elements: any, config: { mapKey: String, mapVer: String, mapApi: String }): Promise

Example
-------
### VUE
```
import TencentMap from "tencent-map";

<template>
    <div ref="tencentMap" style="height:600px"></div>
</template>

<script>
    export default {
        created() {
            this.$nextTick(() => {
                TencentMap.load(this.$refs.tencentMap, { mapKey: "key..." }).then(qq => {
                const myLatlng = new qq.maps.LatLng(-34.397, 150.644);
                const myOptions = {
                    zoom: 8,
                    center: myLatlng,
                    mapTypeId: qq.maps.MapTypeId.ROADMAP
                };
                new qq.maps.Map(TencentMap.elements, myOptions);
                });
            });
        }
    }
</script>
```

---
_Source: https://npm.io/package/tencent-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
