这个中间不是最终答案,续集如下)),只是一些想法
未记录的方法。 (和ftid
代替place_id
范围)
地点 API 网络服务 https://developers.google.com/places/web-service/details
未来无保修:
https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&ftid=0xd62377123a70817:0x85e89b65fcf7c648&
记录的请求是:
https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&placeid=ChIJFwinI3E3Yg0RSMb3_GWb6IU
此请求需要 API KEY设置 API 密钥 https://support.google.com/googleapi/answer/6158862
Google 的回答:(JSON - 轻解析)
{
"html_attributions": [],
"result": {
"address_components": [
{
"long_name": "4",
"short_name": "4",
"types": ["street_number"]
},
{
"long_name": "Calle Cruz de Piedra",
"short_name": "Calle Cruz de Piedra",
"types": ["route"]
},
{
"long_name": "Alacant",
"short_name": "Alacant",
"types": ["locality", "political"]
},
{
"long_name": "Alicante",
"short_name": "A",
"types": ["administrative_area_level_2", "political"]
},
{
"long_name": "Comunidad Valenciana",
"short_name": "Comunidad Valenciana",
"types": ["administrative_area_level_1", "political"]
},
{
"long_name": "Spain",
"short_name": "ES",
"types": ["country", "political"]
},
{
"long_name": "03015",
"short_name": "03015",
"types": ["postal_code"]
}
],
"adr_address": "\u003cspan class=\"street-address\"\u003eCalle Cruz de Piedra, 4\u003c/span\u003e, \u003cspan class=\"postal-code\"\u003e03015\u003c/span\u003e \u003cspan class=\"locality\"\u003eAlacant\u003c/span\u003e, \u003cspan class=\"region\"\u003eAlicante\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eSpain\u003c/span\u003e",
"formatted_address": "Calle Cruz de Piedra, 4, 03015 Alacant, Alicante, Spain",
"geometry": {
"location": {
"lat": 38.3642358,
"lng": -0.4626489
},
"viewport": {
"northeast": {
"lat": 38.3655847802915,
"lng": -0.4612999197084979
},
"southwest": {
"lat": 38.3628868197085,
"lng": -0.463997880291502
}
}
},
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"id": "ce1aa5a252b86d559268866a6a4858db9bba3dff",
"name": "Calle Cruz de Piedra, 4",
"place_id": "ChIJFwinI3E3Yg0RSMb3_GWb6IU",
"reference": "CmRbAAAAn6NLYXEs-ttLvUlgjnh5aDHt-LR_hXe6JmUN8fzv6MJ7Q50xt_zUU_WlTc3aL_BQc70-1YjEb6Soluro5rA8cIFJG_w08RSr_JWo_SFEFc1Ncme_dKVKsPX6Q0LtO8gWEhACTzabAMLQfM5xt1_BNsywGhSZr0WRGlutqeuRgs-IY41ndk3yoQ",
"scope": "GOOGLE",
"types": ["street_address"],
"url": "https://maps.google.com/?q=Calle+Cruz+de+Piedra,+4,+03015+Alacant,+Alicante,+Spain&ftid=0xd62377123a70817:0x85e89b65fcf7c648",
"utc_offset": 60,
"vicinity": "Alacant"
},
"status": "OK"
}
设置 API 密钥
如果您的客户端应用程序不使用 OAuth 2.0,则在调用 Google Cloud Platform 项目中启用的 API 时,它必须包含 API 密钥。应用程序将此密钥作为 key=API_key 参数传递到所有 API 请求中。
要创建应用程序的 API 密钥:
- 前往API控制台 https://console.developers.google.com.
- 从项目列表中,选择一个项目或创建一个新项目。
- 如果 API 和服务页面尚未打开,请打开左侧
菜单并选择API 和服务.
- 在左边,选择证书。
- Click 创建凭据然后选择API key.
Note:除了阅读本页上的说明外,请务必阅读安全使用 API 密钥的最佳实践 https://support.google.com/googleapi/answer/6310037.
(draft)未删除历史记录
仅供测试!临时解决方案:
curl "https://www.google.com/maps/place/data=!4m2!3m1!1s0xd62377123a70817:0x85e89b65fcf7c648" -s -b -L -H "user-agent: Googlebot/2.1 (+http://www.google.com/bot.html)" | FIND """0xd62377123a70817:0x85e89b65fcf7c648"","
在命令提示符下回答:
,["0xd62377123a70817:0x85e89b65fcf7c648",null,null,[null,null,38.364235799999996,-0.4626489]
在那里卷曲 https://curl.haxx.se/如果需要的话
搜索待继续....
我认为,这个(0xd62377123a70817:0x85e89b65fcf7c648)是GoogleMap数据库中地图对象的ID。当点击URL1时。
例如 https://i.stack.imgur.com/0Xd8Z.png
如果您想要地理坐标,请单击 URL2,然后如果需要创建链接作为 EMBED 没问题,结果如下:
src="https://www.google.com/maps/embed?pb=
!1m18
!1m12
!1m3
!1d782.0856626047412
!2d-0.46311117079625247
!3d38.36419405026406
!2m3
!1f0
!2f0
!3f0
!3m2
!1i1024
!2i768
!4f13.1
!3m3
!1m2
!1s0x0%3A0x0
!2zMzjCsDIxJzUxLjEiTiAwwrAyNyc0NS4yIlc
!5e0
!3m2
!1ses
!2ses
!4v1509474812934"
它是 FTID (0xd62377123a70817:0x85e89b65fcf7c648)
ftid 参数是某些地图对象的唯一标识符,就像 fid 和 cid 一样。
需要在地图上但不属于本地数据库的位置由 ftid 参数标识。无法通过 Places 声明这些类型的 Maps 对象。
API 谷歌地方信息 https://developers.google.com/places和其他人一起工作place-id https://developers.google.com/places/web-service/place-id
(Calle Cruz de Piedra, 4 03015 阿利坎特)place-id
= ChIJFwinI3E3Yg0RSMb3_GWb6IU
(地点 -> 地点 ID)
https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder
和反向(地点 ID-> 地点)
https://developers.google.com/maps/documentation/javascript/examples/geocoding-place-id https://developers.google.com/maps/documentation/javascript/examples/geocoding-place-id
NOW:
place-id
to location
- ok
https://developers.google.com/maps/documentation/geocoding/intro?hl=en#ReverseGeocoding https://developers.google.com/maps/documentation/geocoding/intro?hl=en#ReverseGeocoding
FTID
to location
-?问题开放......快速和自动
超越谷歌:
https://google.com/maps?ftid=0xd62377123a70817:0x85e89b65fcf7c648 https://google.com/maps?ftid=0xd62377123a70817:0x85e89b65fcf7c648
https://www.google.com/maps/place/Calle+Cruz+de+Piedra,+4,+03015+Alicante,+%D0%98%D1%81%D0%BF%D0%B0%D0%BD%D0%B8%D1%8F/
@38.3642358,-0.4648376
,17z/data=!3m1!4b1!4m5!3m4!1s0xd62377123a70817:0x85e89b65fcf7c648!8m2!3d38.3642358!4d-0.4626489
也适用于大西洋工作:
https://google.com/maps?ftid=0xadd28c30ec90d79%3A0x44652457c0696504 https://google.com/maps?ftid=0xadd28c30ec90d79%3A0x44652457c0696504
关于 Google 地图嵌入 API 的两句话:
<iframe
src="https://www.google.com/maps/embed?pb=
!1m3
!3m2
!1m1
!1s0xd62377123a70817%3A0x85e89b65fcf7c648"
width="400" height="400" frameborder="0" style="border:0" allowfullscreen>
</iframe>
m
使用以下语法创建块:
1 数字 - ID 或当前块中的位置?
2 数字-值=新块的大小
!<ID>m<value>
!1m3
!3m2
!1m1
!1s0xd62377123a70817%3A0x85e89b65fcf7c648
{}
{,,{}}
{,,{{}}}
{,,{{1s}}}
!1:{}
!1:{!3:{}}
!1:{!3:{!1:{}}}
!1:{!3:{!1:{1s}}}
我希望这有帮助!