【问题标题】:jQuery Geocode - Markers don't move on smaller devices / windowsjQuery Geocode - 标记不会在较小的设备/窗口上移动
【发布时间】:2014-12-04 12:03:12
【问题描述】:

我正在使用 jQuery Geocode 来处理映射用户输入,包括带有回调的可拖动标记。在全尺寸的浏览器中一切都很好,但是当我将浏览器缩小到平板电脑或智能手机的宽度时,一切仍然正常除了标记不再可拖动。有没有其他人经历过这个?我将在此处粘贴我的地理编码信息:

$ ->
  $("input.geocomplete").geocomplete
    details: "form.geocoder_form"
    detailsAttribute: "data-geo"
    blur: true
    map: "div.map_canvas"
    componentRestrictions: 
        country: "US"
    mapOptions:
        backgroundColor: 'white'
    markerOptions:
        draggable: true
        title: 'Your location'
    .bind "geocode:result", (event, result) ->
      console.log result
    .bind "geocode:dragged", (event, latLng) ->
      $("input.geocomplete").geocomplete("find", latLng.lat() + "," + latLng.lng());
    .bind "geocode:error", (event, status) ->
      console.log "Error: " + status

【问题讨论】:

    标签: jquery google-maps-markers geocode


    【解决方案1】:

    好吧,刚刚发现,这是 HTML 的问题(这是使用 Twitter Bootstrap)。

    不工作:

    <div class="row col-lg-6 col-xs-12">
      <div class="map_canvas"></div>
      <br>
    </div>
    

    工作:

    <div class="row">
      <div class="col-lg-6 col-xs-12">
        <div class="map_canvas"></div>
      </div>
      <br>
    </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多