Google maps 如何从GoogleDeveloper定制StoreLocator插件的侧面板
我正在尝试使用google developer的商店定位器插件: 我想将搜索定位器重新定位到页面上方,就像它在谷歌地图上一样,这就是我最终的结果: 1.我在上面和侧面创建了两个面板 2.并为它们分配了相同的视图。 3.使用css隐藏up面板上的storelist。 4.隐藏侧面板上的搜索定位器 5.然后,在向上面板上的搜索定位器上搜索时,我没有在侧面板上获得更新的商店列表和功能 请帮我弥补我所缺少的 以下是我尝试使用的js代码: google.maps.event.addDomListener(窗口'load',函数(){var map=new google.maps.map(document.getElementById('map-canvas'){ 中心:新google.maps.LatLng(-28135), 缩放:5Google maps 如何从GoogleDeveloper定制StoreLocator插件的侧面板,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我正在尝试使用google developer的商店定位器插件: 我想将搜索定位器重新定位到页面上方,就像它在谷歌地图上一样,这就是我最终的结果: 1.我在上面和侧面创建了两个面板 2.并为它们分配了相同的视图。 3.使用css隐藏up面板上的storelist。 4.隐藏侧面板上的搜索定位器 5.然后,在向上面板上的搜索定位器上搜索时,我没有在侧面板上获得更新的商店列表和功能 请帮我弥补我所缺少的 以下是我尝试使用的js代码: google.maps.event.addDomListener
mapTypeId: google.maps.MapTypeId.ROADMAP });
//var panelDiv=document.getElementById('panel');var panelDiv=
$('.panel');var searchPanel=$('#searchPanel')
var数据=新MedicareDataSource
var视图=新的storeLocator.view(地图、数据、{
地理位置:错,
功能:data.getFeatures()})
/*var search_panel=newstorelocator.panel(searchPanel{
视图:视图,
说明:假});
*/
var侧面板=新的storeLocator.panel(panelDiv{
视图:视图,
locationSearch:true})
/*$(搜索面板).live('视图已更改',函数(){
警报(“工作”)
}))*/
}))
问题在于风格
<style type="text/css">
body { font-family: sans-serif; }
#map-canvas, #panel { height: 500px; } //HERE
#panel { width: 300px; float: left; margin-right: 10px; }//HERE
#panel .feature-filter label { width: 130px; } //HERE
p.attribution, p.attribution a { color: #666; }
</style>
正文{字体系列:无衬线;}
#地图画布,#面板{高度:500px;}//此处
#面板{宽度:300px;浮动:左;右边距:10px;}//此处
#panel.feature过滤器标签{宽度:130px;}//此处
p、 归因,p.归因{color:#666;}
您需要更改此选项以满足您的要求。如果您需要,可以在storelocator.css上使用此选项。我现在使用此选项移动页面顶部的搜索框:
.storelocator-panel .location-search {
top:45px;
padding: 5px;
position: absolute;
width: 400px;
margin-left:-210px;
left:50%;
}
插件链接如下:好的。明白了。已经使用doms的绝对定位进行了自定义。无论如何,谢谢。但是,你能告诉我如何自定义左侧面板-使未排序列表显示为排序列表吗?我不想在核心插件内进行更改,尽管:-|