Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 如何设置谷歌地图缩放控制字体大小_Google Maps - Fatal编程技术网

Google maps 如何设置谷歌地图缩放控制字体大小

Google maps 如何设置谷歌地图缩放控制字体大小,google-maps,Google Maps,我必须设置scaleControl字体大小。我试着像下面那样 var opts = { zoom: 12, center: latlng, mapTypeId: google.maps.MapTypeId.SATELLITE, scrollwheel: false, disableDoubleClickZoom: true, draggable: true, mapTypeControl: true, panControl: false, zoo

我必须设置scaleControl字体大小。我试着像下面那样

var opts = {
  zoom: 12, 
  center: latlng, 
  mapTypeId: google.maps.MapTypeId.SATELLITE, 
  scrollwheel: false, 
  disableDoubleClickZoom: true, 
  draggable: true,
  mapTypeControl: true, 
  panControl: false, 
  zoomControl: false, 
  scaleControl: true,
  streetViewControl: false,
  scaleControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }
 };
 map = new google.maps.Map(document.getElementById("map_canvas"), opts);
在上面的代码中设置了如下的字体大小

 scaleControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT, style:{fontSize: 10} }

它不起作用。。。任何建议…

@VJS Scale Control没有可编辑或更新的属性,无法为其创建自定义视图。请参阅有关的链接。 您可以尝试通过创建自己的css来覆盖它,但请注意(版权和使用条款)样式将受到影响