|
@@ -28,6 +28,7 @@
|
|
<div id="location-container"></div>
|
|
<div id="location-container"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <input type="hidden" id="select-position-input" value="{{ $location }}">
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@endsection
|
|
|
|
|
|
@@ -41,10 +42,10 @@ $(function() {
|
|
//添加监听事件 获取鼠标单击事件
|
|
//添加监听事件 获取鼠标单击事件
|
|
qq.maps.event.addListener(map, 'click', function(event) {
|
|
qq.maps.event.addListener(map, 'click', function(event) {
|
|
var marker = new qq.maps.Marker({
|
|
var marker = new qq.maps.Marker({
|
|
- position:event.latLng,
|
|
|
|
|
|
+ position: event.latLng,
|
|
map:map
|
|
map:map
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ console.log(event.latLng);
|
|
qq.maps.event.addListener(map, 'click', function(event) {
|
|
qq.maps.event.addListener(map, 'click', function(event) {
|
|
marker.setMap(null);
|
|
marker.setMap(null);
|
|
});
|
|
});
|
|
@@ -56,7 +57,6 @@ $(function() {
|
|
|
|
|
|
$('#location-keyword-search').on('click', function () {
|
|
$('#location-keyword-search').on('click', function () {
|
|
var regionText = $('#location-keyword-input').val();
|
|
var regionText = $('#location-keyword-input').val();
|
|
- console.log(regionText);
|
|
|
|
searchService.setLocation(regionText);
|
|
searchService.setLocation(regionText);
|
|
searchService.search();
|
|
searchService.search();
|
|
})
|
|
})
|