用户定位驱动API

问题描述 投票:0回答:0

好吧,我很困惑,所以,我正在开发一个应用程序,我正在尝试实现一个显示用户开车到客户位置的功能。类似于 doordash 类型的函数,但有谁知道函数式 API ......还有。我正在尝试开发一种拼车平台。任何提示我用 python 编写并使用 SQL 用于用户配置文件并创建将要清理的存储过程......但是,我目前的问题是我要实现 ARCGIS API,用于在用户配置文件更新时绘制基本地图。

'''street view of arc gis'''
from arcgis.gis import GIS
import arcgis.geocoding as geocoding
gis = GIS('home')
callback_map = gis.map('San Diego convention center, San Diego, CA', 16)
def find_addr(callback_map, g):
     try:
        callback_map.draw(g)
        geocoded = geocoding.reverse_geocode(g)
        print(geocoded['address']['Match_addr'])
     except:
    print("Couldn't match address. Try another place...")
callback_map.on_click(find_addr)
 callback_map

那是 ARCGIS 映射功能的示例,我需要实现后端以便能够更新并放置指向地址的指针(如果它被打入 ARC GIS),我会实现用户配置文件以更新地址范围然后要求用户根据使用 tweepy API 找到的范围确认地址?

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)

# set access to user's access key and access secret
auth.set_access_token(access_token, access_token_secret)

# calling the api
api = tweepy.API(auth)

# the ID of the user
id = 57741058

# fetching the user
user = api.get_user(id)

# fetching the location
location = user.location

print("The location of the user is : " + location)

如果是这样,在使用 TWEEPY API 之后,这是否足以在前端 API 上为 ARCGIS 地图生成一个位置点?

我已经像上面说的那样使用 arcgis api 进行了尝试,但我无法像使用 tweepy 那样进行实时地理定位跟踪。

python tweepy arcgis
© www.soinside.com 2019 - 2024. All rights reserved.