简体   繁体   English

如何在没有标记内容的情况下加载google map?

[英]How to load google map without its marker content?

On home page of my site there is google map embedded. 在我网站的首页上嵌入了Google地图。 Size of google maps is 55mb because there are 100 markers on it and every marker have image in it(in info window). google maps的大小为55mb,因为上面有100个标记,每个标记都有图像(在信息窗口中)。 I am using following to embed it in site 我正在使用以下内容将其嵌入网站

<iframe width="1070" height="460" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.in/maps/ms?msa=0&amp;msid=211583848080531580036.0004e201d8a2ad13f0895&amp;hl=en&amp;ie=UTF8&amp;t=m&amp;ll=12.993442,79.125969&amp;spn=22.947419,49.509262&amp;output=embed"></iframe><br />

I do not want to load content of all marker at once. 我不想一次加载所有标记的内容。

I have done this in one of joomla site using this code in custom html article(of Joomla) 我在joomla站点之一中使用自定义html文章(Joomla的)中的代码完成了此操作

{mosmap msid='211583848080531580036.0004c74a22231f20dfa00'|lat='19.997023 '|lon='73.790102'|width='900'|height='650'|zoom='12'}

How to use above code in site which is not on Joomla CMS. 如何在Joomla CMS以外的网站中使用上述代码。

Or 要么

Is there other way to load google map without loading its markers content at once(on page load)? 还有其他方法可以加载Google地图而无需一次加载其标记内容(页面加载时)吗?

Are you just using an iFrame with a link to google maps in your website? 您是否只是在使用带有链接到网站中Google地图的iFrame? If so you're going about it completely the wrong way. 如果是这样,您将完全以错误的方式进行操作。 Quite apart from using the evil iFrame (I don't like them at all, if you hadn't guessed ;) ), you have no control over the map whatsoever - the script on the website you're linking to controls the map, you're simply displaying their map to the user. 除了使用邪恶的iFrame(我完全不喜欢它们,如果您没有想到;))之外,您也无法控制地图-您链接到的网站脚本可以控制地图,您只是向用户显示他们的地图。

Try looking at this to see how you can have your own map on your website which you control with your script. 尝试查看此内容,以了解如何在您的网站上使用脚本来控制自己的地图。

Of course, it's entirely possible that I've misunderstood your question. 当然,我很可能误会了你的问题。 If so, please let me know and I'll try to help! 如果是这样,请让我知道,我会尽力帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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