[英]How to show the pin after input in textbox
How can i show the Adress i put in to 4 textboxes (Pin Changing after onchange) on the Google map on my website? 如何在我的网站的Google地图上显示放入4个文本框(onchange之后的Pin更改)的地址? I want to have 4 input fields (zip, city, street and house number) If there are more than 4 letters than he have to show me the adress on card 我想输入4个字段(邮政编码,城市,街道和门牌号),如果字母多于4个,他必须向我出示卡片上的地址
i tried the democode from download page 我从下载页面尝试了演示代码
$(function(){
$('#test').gmap3({
map:{
options:{
center:[46.721976,14.180603],
zoom:8,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
mapTypeControlOptions: false,
navigationControl: false,
scrollwheel: false,
streetViewControl: false
}
}
});
$('#test-address').keydown(function(e){
var addr = $('#test-address').val();
if ( !addr || !addr.length ) return;
$("#test").gmap3({
getlatlng:{
address: addr,
callback: function(results){
if ( !results ) return;
$(this).gmap3({
marker:{
latLng:results[0].geometry.location,
map:{
center: true
}
}
});
}
}
});
});
});
but i need this from 4 input boxes combined. 但是我需要从4个输入框中组合这个。
how can i do this? 我怎样才能做到这一点?
In Html code i have the Input Box and the Gmap Div 在HTML代码中,我有输入框和Gmap Div
This is from the demo folder. 这是从演示文件夹。 I need the combination of 4 input boxes (zip, city, street, housenumber) instead the 1 input box and the demo script adds pins without remove the input i done before (if i change the adress) 我需要4个输入框(邮政编码,城市,街道,门牌号)的组合,而不是1个输入框,并且演示脚本会添加引脚,而不会删除我之前所做的输入(如果我更改地址)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.