gpt4 book ai didi

javascript - 如何使用 Sequelize 显示来自 Google map 地址的内容?

转载 作者:行者123 更新时间:2023-12-03 22:17:33 25 4
gpt4 key购买 nike

我找了几个星期的信息。
首先,我使用 AngularJS 1.6 ngMap 模块。

这就是我正在做的事情:

  • 我在主页中使用了一个搜索框(带有 ngMap 自动完成功能):
    import htmlTemplate from './searchBox.html';

    export default {

    template: htmlTemplate,

    require: {
    parent: '^home'
    },

    controller: function controller(MapsService, $log) {
    'ngInject';

    const self = this;

    this.$onInit = () => {
    $log.info('searchBox component init');
    MapsService.loadGoogleApi().then(() => {
    this.loaded = true;
    this.onPlaceChanged = function onPlaceChanged() {
    const place = this.getPlace();
    if (place.geometry) {
    self.activity.lat = place.geometry.location.lat();
    self.activity.lng = place.geometry.location.lng();
    }
    };
    });
  • 另外,我正在使用一个显示事件的组件。
    当我通过表单创建事件时,我填写了 地址字段 它使用自动完成。
    <div class="input-field col s12">
    <i class="material-icons prefix">location_on</i>
    <input ng-if="$ctrl.loaded" places-auto-complete ng-model="$ctrl.activity.address" id="icon_prefix" type="text" on-place-changed="$ctrl.onPlaceChanged()"
    class="validate">
    <label for="icon_prefix">{{'ANNOUNCE.ADDRESS' | translate}}
    </label>

  • 我指定了地址 转换为纬度/经度 .
    MapsService.loadGoogleApi().then(() => {
    this.loaded = true;
    this.onPlaceChanged = function onPlaceChanged() {
    const place = this.getPlace();
    if (place.geometry) {
    self.activity.lat = place.geometry.location.lat();
    self.activity.lng = place.geometry.location.lng();
    }
    };
    });

  • 我的问题是:

    如何通过使我的搜索框地址和我的表单地址重合来显示事件(按城市)?

    非常感谢 !

    最佳答案

    所以...我找到了答案。
    有必要在数据库中添加一个存储过程并创建一个允许取回数据的函数。

    关于javascript - 如何使用 Sequelize 显示来自 Google map 地址的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48270597/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com