Home > Web Front-end > JS Tutorial > body text

How does Baidu Map JavaScript API display multiple maps on the same page?

高洛峰
Release: 2016-11-28 10:15:47
Original
1358 people have browsed it

经常有人问,百度地图JavaScript API能在同一页面显示多个地图吗?当然可以啊,为什么不可以呢?地图之于页面无非就是个div,我们可以在页面显示多个div,自然也可以显示多个地图。


以下是在页面加入两个地图的效果:

How does Baidu Map JavaScript API display multiple maps on the same page?

页面核心代码如下:


[html]
 

 
   
 
  
 
   
 
 
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template