谷歌地图在WordPress中被破解 [英] Google Map broken in WordPress

查看:82
本文介绍了谷歌地图在WordPress中被破解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何解决WordPress中Google地图的格式问题。我创建的地图充满了错误。主要问题是信息框的词根没有出现,关闭信息框的十字不可见,某些标记难以打开,街景摄像师没有出现在屏幕上,真的很烦人的是多色box显示在地图的中间。



我知道javascript是合理的 - 当我将它加载到纯HTML页面时,它工作正常。我尝试将我的主题切换到TwentyEleven,但它没有任何区别。



我原来在帖子中粘贴了所有javascript,并且我认为这可能会导致问题。我已经注册并入队了Google Maps库,然后在我的主题标题中引用了我的JavaScript文件。这没有任何区别。



你可以在这里看到一个例子: http://rhedeg.co.uk/pontsicill_map/#.UXmD1b-cO0s



任何想法都会很棒赞赏。

非常感谢!

解决方案

试试这个CSS技巧:

 #map-canvas img {
max-width:none;
}

#map-canvas label {
width:auto;
display:inline;
}


Does anyone know how to fix formatting issues in Google Maps in WordPress. The map I have created is full of bugs. The main problem is that the stems of infoboxes don't show up, the cross to close an infobox isn't visible, some markers are difficult to open, the streetview pegman doesn't show up on screen and really annoyingly a multi-coloured box shows up in the middle of the map.

I know that the javascript is sound - it works fine when I load it in a plain HTML page. I've tried switching my theme to TwentyEleven but it doesn't make any difference.

I originally pasted all of the javascript in the post and I thought this might be causing the problem. I have since registered and enqueued the Google Maps library and then referenced my javascript file in the header of my theme. This hasn't made any difference.

You can see an example here: http://rhedeg.co.uk/pontsicill_map/#.UXmD1b-cO0s

Any ideas would be greatly appreciated. I am at the end of my tether but would like to avoid bringing in the professionals!!!

Many thanks!

解决方案

Try this CSS trick:

#map-canvas img { 
  max-width: none;
}

#map-canvas label { 
  width: auto;
  display:inline; 
}

这篇关于谷歌地图在WordPress中被破解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆