回复: Re: 如何通过 seajs 来加�½�百度地图�� api ?

34 views
Skip to first unread message

Km.Van

unread,
Mar 21, 2013, 11:02:42 AM3/21/13
to se...@googlegroups.com
那个不是规范的摸块吧


---- 原始信息 ----
发自: liz <shengy...@gmail.com>
发送时间:
收件人: se...@googlegroups.com
主题: Re: 如何通过 seajs 来加载百度地图�� api ?

Google/百度地图API不是提供异步加载的接口么, 直接require.async("
http://api.map.baidu.com/api?v=1.4&callback=sth") 就可以了啊,
干嘛非得document.write...


2013/3/13 Km Van <kmva...@gmail.com>

>
> 也就是传说中的“重写document。write”了。不过如果要使用异步的话,最简单的方法就是iframe,除此之外,如果官方没有异步加载的api,就没办法了
>
>
> On Wednesday, November 7, 2012 11:38:07 AM UTC+8, Frank Wang wrote:
>
>> 这种方案是手动覆盖掉 document.write 方法,改成支持异步的
>> 但牵扯面比较多,建议还是不修改
>> 老的和新的可以混用呀
>>
>>
>> 2012/11/7 sam <zengd...@gmail.com>
>>
>>> 谢谢回复,真的没其它折中解决方案吗?有些地方需要用到类似的 API 。
>>>
>>>
>>> 在 2012年11月7日 上午10:59,Frank Wang <lifes...@gmail.com>写道:
>>>
>>>> 这个没办法,百度用了 document.write,无法支持异步载入。
>>>>
>>>>
>>>> On Fri, Nov 2, 2012 at 5:30 PM, Sam Zeng <zengd...@gmail.com> wrote:
>>>>
>>>>> RT,加载外链的:http://api.map.baidu.**com/api?v=1.3<http://api.map.baidu.com/api?v=1.3>和
>>>>> http://dev.baidu.com/wiki/**static/map/API/examples/**
>>>>> script/changeMore.js<http://dev.baidu.com/wiki/static/map/API/examples/script/changeMore.js>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 王保平 / 玉伯(射雕)
>>>> 送人玫瑰手有余香
>>>>
>>>>
>>>
>>
>>
>> --
>> 王保平 / 玉伯(射雕)
>> 送人玫瑰手有余香
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "seajs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to seajs+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
You received this message because you are subscribed to a topic in the Google Groups "seajs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/seajs/rlHMhuzY6O8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to seajs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages