This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Jian Li
Posted Apr 22 - Read on Facebook

hey,
how to transcode this html code in framer?
________
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=abcde"></script>
<script type="text/javascript">
var map = new AMap.Map('container',{
resizeEnable: true,
zoom: 10,
center: [116.480983, 40.0958]
});
_________

I try to do this in framer:
_________
map = new Layer
html: "<iframe src='http://webapi.amap.com/maps?v=1.3&key=abcde&output=embed>'</iframe>"

map.html += "<div id='map'></div>"
mapElement = p2_map.querySelector("#map")
mapElement.style.height = pageDa.height+"px"

map = new AMap.map (mapElement)
_____

and I got a error:
ReferenceError: Can't find variable: AMap

2 Comments

Jordan Robert Dobson

Drop that script tag into the HTML

I think the issue is the code isn't ready yet and hasn't been evaluated.

If your REALLY want to use what you have... try putting a 10 second delay wrapped around your new map

Jian Li

thank your Jordan, it worked

Read the entire post on Facebook