How to insert Baidu dynamic map in cms and kindeditor

Source: Internet
Author: User

It is not difficult to insert a dynamic map into a webpage. Inserting a dynamic map in kindeditor is easier. The latest kindeditor version has added the function of inserting a dynamic map.

What I want to say here is that if a cms is integrated with the previous version of kindeditor, the dynamic map function is NOT INSERTED, or the map size generated by kindeditor is too small to be changed, so what should we do?

By accident, I think of a method. We can first generate the script code according to the method at the beginning of the article, then click the [insert program code] button in kindeditor, select javascript, paste the code generated by Baidu into the pop-up window, save it, refresh the foreground, and you will see that Baidu's dynamic map is generated.

Of course, the css style of the generated dynamic map may be different from what we need, so we need to modify some css styles in the script generated by Baidu.

In addition, we want to place the contact information and other texts below the dynamic map, but after entering the text in kindeditor, refresh the foreground again, we will find that all the generated Map pages are out of order. I think this is due to conflicts between text content, text styles, and map scripts. Why? I don't know.

I found that when I inserted the address script, if it looks like this in the edit box, then when I entered this article below, the front-end page will be out of order.


If the inserted map script is shown below, it is okay to input the text after the script.


If we directly click the insert program code button, and the inserted code will always look like Figure 1, we can try to click [full screen display] and then insert the code, this should be done.

Final effect:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.