gpt4 book ai didi

expressionengine - 在 Google Maps for ExpressionEngine 中覆盖 map 缩放级别

转载 作者:行者123 更新时间:2023-12-03 23:38:11 24 4
gpt4 key购买 nike

我正在使用 ExpressionEngine 2.5.3 和 Google Maps for ExpressionEngine 3.0.190(又名 3.1 beta),代码如下:

{exp:gmap:init id="map1" class="gmap" scrollwheel="false" style="width:930px;height:500px" clusterStyles="{url: '/assets/images/cluster-icon-blue.png', textColor: '#fff', textSize: '12', height: 52, width: 53, anchor: [0, 0]}" overviewMapControl="true" overviewMapControlOptions="{opened:true}"}

{exp:channel:entries channel="people" status="open" disable="categories|category_fields|member_data|pagination" limit="1000" dynamic="no" sort="asc"}
{cf_people_geo_location id="map1" show_one_window="true" icon="/assets/images/aabc-map-icon-white.png" infobox="true" offsetY="-45" offsetX="15" closeBoxMargin="5px" class="ui-infobox-dark" closeBoxURL="/themes/third_party/gmap/css/images/white-close-button.png" style="width: '250px'" clearanceX="10" show_one_window="true" clustering="true"}
<p><a href="/register/{url_title}/" title="View {title}">View {title} &raquo;</a></p>
{/cf_people_geo_location}
{/exp:channel:entries}

是否可以设置 map 在页面加载时使用的缩放级别?它似乎是根据正在绘制的点自动设置它,但我想覆盖这个值并放大几个缺口。

谢谢,

斯特

最佳答案

使用 extend_bounds 参数并将其设置为“false”

https://objectivehtml.com/google-maps/documentation/tag/marker#extend_bounds

试试这个:

{exp:gmap:init id="map1" class="gmap" scrollwheel="false" style="width:930px;height:500px" clusterStyles="{url: '/assets/images/cluster-icon-blue.png', textColor: '#fff', textSize: '12', height: 52, width: 53, anchor: [0, 0]}" overviewMapControl="true" overviewMapControlOptions="{opened:true}" zoom="10"}

{exp:channel:entries channel="people" status="open" disable="categories|category_fields|member_data|pagination" limit="1000" dynamic="no" sort="asc"}
{cf_people_geo_location id="map1" show_one_window="true" icon="/assets/images/aabc-map-icon-white.png" infobox="true" offsetY="-45" offsetX="15" closeBoxMargin="5px" class="ui-infobox-dark" closeBoxURL="/themes/third_party/gmap/css/images/white-close-button.png" style="width: '250px'" clearanceX="10" show_one_window="true" clustering="true" extend_bounds="false"}
<p><a href="/register/{url_title}/" title="View {title}">View {title} &raquo;</a></p>
{/cf_people_geo_location}
{/exp:channel:entries}

关于expressionengine - 在 Google Maps for ExpressionEngine 中覆盖 map 缩放级别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13301920/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com