我想提醒选定的位置,但它没有提醒任何东西:
<div class="form-group">
<input class="placepicker form-control" data-map-container-id="collapseOne"/>
</div>
<div id="collapseOne" class="collapse">
<div class="placepicker-map thumbnail"></div>
</div>
var mapPlacepicker = $(".placepicker").placepicker();
$(".placepicker").each(function() {
var target = this;
var $collapse = $(this).parents('.form-group').next('.collapse');
var $map = $collapse.find('.another-map-class');
var placepicker = $(this).placepicker({
map: $map.get(0),
placeChanged: function(place) {
alert("place changed: ", place.formatted_address, this.getLocation());
}
}).data('placepicker');
});