我想得到一張地圖(我只需要一張圖片),它具有道路網絡 ,但沒有標籤(地圖上的文本)。我試圖從谷歌API獲得這樣的地圖,並認爲"element:geometry"
的作品。如何獲得沒有標籤的地圖?
但是,例如,this link仍然充滿文本。
如何獲取沒有文字標籤的道路網絡地圖(靜態圖片確定)?
任何供應商都可以,例如谷歌,雅虎,Mapquest ...
我想得到一張地圖(我只需要一張圖片),它具有道路網絡 ,但沒有標籤(地圖上的文本)。我試圖從谷歌API獲得這樣的地圖,並認爲"element:geometry"
的作品。如何獲得沒有標籤的地圖?
但是,例如,this link仍然充滿文本。
如何獲取沒有文字標籤的道路網絡地圖(靜態圖片確定)?
任何供應商都可以,例如谷歌,雅虎,Mapquest ...
使用這種樣式:
style=feature:all|element:labels|visibility:off
它會隱藏所有功能的所有標籤。
http://maps.googleapis.com/maps/api/staticmap?center=28.459033,22.060547&zoom= 2&format = png&sensor = false&size = 640x480&maptype = roadmap&style = feature:administrative | weight:0.1 | invert_lightness:true | visibility:off&style = feature:water | element:labels.text | visibility:off&style = feature:landscape.natural | visibility:on – 2015-03-18 10:14:21
This is the documentation地圖樣式的JavaScript API。還有一個Styled Map Wizard,讓你玩風格,以得到你想要的。
通過「我只需要一張照片:」我想你不需要訪問API,谷歌公司開發者仍然沒有從舊映射到應用的所有功能的機會新設計。 但是你仍然可以去https://maps.google.com/?output=classic
訪問它,你可以去設置和自定義「刻度標記關」等等......
我得到了一個更好的解決方案:
創建html文件並插入下面的代碼。
<!DOCTYPE html>
<html>
<head>
<title>Mapa GMR Norte</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
function initMap() {
var customMapType = new google.maps.StyledMapType([
{
elementType: 'labels',
stylers: [{visibility: 'off'}]
}
], {
name: 'Custom Style'
});
var customMapTypeId = 'custom_style';
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 13,
center: {lat: 41.4416459, lng: -8.2911885}, // Brooklyn.
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, customMapTypeId]
}
});
map.mapTypes.set(customMapTypeId, customMapType);
map.setMapTypeId(customMapTypeId);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?signed_in=true&callback=initMap"
async defer></script>
</body>
</html>
希望它有幫助! :)
Google地圖樣式化映射向導(以下鏈接)將允許您刪除標籤(並且還可以製作大量其他自定義項)。
該鏈接是Google地圖樣式映射向導。如果該鏈接不可用,那麼我的回答是無效的。 – nicolefurlan 2016-04-25 19:16:34
答案中的鏈接已死 - *錯誤404(未找到)* – Pang 2017-02-03 02:32:34
現在可在此找到樣式嚮導:https://mapstyle.withgoogle.com/ – smashuu 2017-08-07 18:28:53
這些解決方案的 '路線圖' 和 '衛星' 工作。我正在嘗試獲取沒有街道名稱的StreetView。我一直在閱讀API文檔,但無法找到如何在街景上刪除標籤。任何線索? – 2017-11-05 18:05:25