Skip to content

Commit a51e6fb

Browse files
committed
【update】examples readme
1 parent 7ebfef0 commit a51e6fb

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

examples/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# iClient-JavaScript 压缩包
2+
3+
按需下载 iClient-JavaScript 的压缩包,解压后保持 dist 文件夹和 example 文件夹平级。
4+
5+
dist 文件夹下是 iclient 地图API;
6+
7+
example 文件夹是示例文件,在浏览器中打开 index.html 可查看示例列表;
8+
9+
示例需要在服务器环境打开运行。
10+
11+
# 常见的几种服务器环境
12+
13+
## Apache Tomcat 等Web服务中间件
14+
15+
### 1.下载 Tomcat 服务器 和 JDK
16+
17+
```
18+
在 JDK 官网( https://www.oracle.com/java/technologies/javase-downloads.html )下载安装 JDK。
19+
20+
在 tomcat 官网( https://tomcat.apache.org )下载安装 tomcat。
21+
```
22+
23+
### 2.开启 tomcat 服务器
24+
25+
```
26+
在 tomcat 安装目录下进入 bin 文件夹,双击 startup.bat 文件开启 tomcat 服务器。
27+
```
28+
29+
### 3.使用
30+
31+
```
32+
将上述解压后的文件夹放入 tomcat 安装目录下的 webapps 文件夹中。
33+
在浏览器地址栏输入 `http://localhost:port/放入 webapps 文件夹中的文件路径`,回车即可打开示例文件。
34+
例如:http://localhost:8080/iClient/examples/index.html
35+
```
36+
37+
## Visual Studio Code 插件 Live Server
38+
39+
### 1.安装
40+
41+
```
42+
在 Vscode 中安装 Live Server 插件,并打开上述的文件夹。
43+
```
44+
45+
### 2.使用
46+
47+
```
48+
在菜单栏右键选中 index.html 文件,在对话框中选择 Open with Live Server 即可打开示例文件。
49+
```
50+
51+
## Node.js
52+
53+
### 1.下载 Node.js
54+
55+
```
56+
在 Node 官网( https://nodejs.org )下载安装 Node.js 。
57+
在命令行输入:
58+
$ npm -v
59+
返回 npm 的版本号即表示安装成功。
60+
```
61+
62+
### 2.安装 web 服务器
63+
64+
```
65+
npm install -g http-server
66+
```
67+
68+
### 3.使用
69+
70+
```
71+
在上述上述文件夹下打开命令行
72+
在命令行输入 http-server 即可在此文件夹下打开服务器,此时返回域名和端口号。
73+
到浏览器输入该地址即可打开示例文件。
74+
```

0 commit comments

Comments
 (0)