简体   繁体   English

我可以从Google Map(v3)中删除网格线吗?

[英]Can I remove grid lines from Google Map (v3)?

I have a map which I've customised with a JSON style through the Google Maps v3 API Styled Maps Wizard, but there was no option to edit grid lines - they're a little awkward and don't serve much purpose, but I can't work out which parameter controls them. 我有一张通过Google Maps v3 API样式化的地图向导使用JSON样式自定义的地图,但是没有编辑网格线的选项-它们有点尴尬,用途不大,但是我可以不能确定哪个参数控制它们。

This isn't related to printing the map, like other questions on the topic seem to be. 这与打印地图无关,就像该主题上的其他问题一样。

EDIT Picture added from geocodezip's example (see comment on question): EDIT图片是从geocodezip的示例中添加的(请参阅问题注释): 在此处输入图片说明

This is from my map, where they're more obvious and break up the picture into some arbitrary grid: 这是从我的地图中获得的,它们在其中更明显,并将图片分解为任意网格: 在此处输入图片说明

Those "grid lines" are the tile boundaries. 这些“网格线”是图块的边界。 They are the result of a css or a browser problem. 它们是CSS或浏览器问题的结果。 Nothing you can do about them with the API. 使用API​​,您无能为力。

I know this is an old question but I had the same issue today. 我知道这是一个老问题,但是今天我也遇到了同样的问题。 The map would render properly the first time, but after any interaction (scroll, zoom, etc), it looked like grid lines would appear. 该地图将在第一时间正确渲染,但是在进行任何交互(滚动,缩放等)之后,看起来好像会出现网格线。 The problem was my zoom settings in chrome were not at 100%. 问题是我在Chrome中的缩放设置不是100%。
Some other threads suggested this could be a version issue with google maps but I assume this is resolved by now. 其他一些线程建议这可能是Google Maps的版本问题,但我认为目前已解决。

Had the same problem in Chrome (even not using zoom) with my map and got a CSS solution: 我的地图在Chrome中遇到了相同的问题(甚至没有使用缩放),并获得了CSS解决方案:

#map [tabindex="0"] > div:first-child {
    will-change: transform;
}

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

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