谷歌位置搜索 蹩脚结合jquery.ui.gmap
2013-05-07 19:15
169 查看
http://gmaps-samples-v3.googlecode.com/svn/trunk/localsearch/places.html
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
var gLocalSearch = new GlocalSearch(); gLocalSearch.setSearchCompleteCallback(null, OnLocalSearch); function OnLocalSearch() { if (!gLocalSearch.results) { window.alert("未找到,请手工查找"); return; } //debugger; //console.log(gLocalSearch.results[0]); var result = gLocalSearch.results[0]; var lat =result.lat;//$(item).attr("lat"); var lng = result.lng;//$(item).attr("lng"); var latlng = new google.maps.LatLng(lat, lng); $('#map_canvas').gmap('addMarker', { 'position': latlng, 'bounds': true, 'draggable': true }, function (map, marker) { $('#map_canvas').gmap('get', 'map').setOptions({ 'center': latlng , 'draggable': true}); setTimeout(function () { $('#map_canvas').gmap('option', 'zoom', 15); }, 1000); }).click(function () { }); }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
function Search() { var text = ''; if ($('#selectcounty').val() != '') { text += $("#selectcounty option:selected").text()+' '; } if ($('#selectcity').val() != '') { text += $("#selectcity option:selected").text()+' '; } if ($('#selectprovince').val() != '') { text += $("#selectprovince option:selected").text()+' '; } text += $('#detailaddress').val(); gLocalSearch.execute(text); }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
相关文章推荐
- solr进阶八:jQuery UI Autocomplete与solr搜索结合
- jquery插件:文字滚动和google地图位置选择搜索
- JqueryUI AutoComplate实现文本框搜索,自动补全效果
- jquery-ui autocomplete 结合ajax实现自动完成搜索框匹配
- ajax结合jQuery autocomplete 实现类似百度搜索一样的输入联想
- jQuery实现的仿百度,仿谷歌搜索下拉框效果示例
- jQuery UI Draggable + Sortable 结合使用
- jQuery UI Draggable + Sortable 结合使用(实例讲解)
- 为jquery.ui.dialog 增加“在当前鼠标位置打开”的功能。参考"wind"的方法,感谢"wind",感谢 jww测试。(已兼容ie7,8,firefox3.5,chrome4)4)
- 解决Select2控件不能在jQuery UI Dialog中不能搜索的bug
- jquery-ui-处理拖动位置Droppable,Draggable
- jQuery WeUI+java实现仿微信顶部搜索栏功能(异步)
- jqueryui autocomplete结合AJAx实现自动补全
- JQuery Smart UI与Moss结合演示
- jquery easy ui 简单字段选择搜索实现
- 手把手教你如何在jquery easy ui 中添加搜索、导出excel、增删改等操作按钮
- jQuery UI Autocomplete 体验 (模糊搜索)
- jQuery UI =>jquery-ui.js中sortable方法拖拽对象位置偏移问题
- JQuery Smart UI与Moss结合演示