简体   繁体   中英

Displaying Google Maps place card with JavaScript

I would like to display a place card with Google Maps like the photo below. Does anybody have an idea on how to accomplish that? It's showing with iFrame embed code, but not with JavaScript...

<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3667.38466539855!2d72.64398725007217!3d23.192648084792943!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x395c2a4354a4239f%3A0x4f86b47426db285b!2sIndroda+Nature+Park!5e0!3m2!1sen!2sin!4v1500619463393" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

在此处输入图片说明

Your help is appreciated.

I don't think the functionality is ready-made. You have to:

  1. Read the place information through the Places API .
  2. Create an Info Window with your desired content.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM