下午好!我通过 HttpClient 使用 Azure Maps API。如何启用对 TLS 1.2 的支持?正如我在 Framework 4.6+ 中所知道的那样,它是受支持的。我不应该为此做任何事情吗?
尝试通过应用服务从 Azure Maps 获取令牌时,它返回以下错误。
"Azure CLI authentication failed due to an unknown error. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/azclicredential/troubleshoot ERROR: AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password. The grant was issued on '2022-12-13T05:31:55.3867300Z' and the TokensValidFrom date (before which tokens are not valid) for this user is '2023-01-28T06:51:55.0000000Z'.
Run Code Online (Sandbox Code Playgroud) 我尝试在我的phonegap应用程序中通过javascript Azure Map创建地图,但出现以下错误:
atlas.min.js?api-version=1.0:362 未捕获(承诺中)错误:无效的 LngLat 纬度值:必须介于 -90 和 90 之间
我的代码:
var map = new atlas.Map("task-map-view", {
"subscription-key": MapsAccountKey,
center: [39.749434, -104.930420],
zoom: 8
});
Run Code Online (Sandbox Code Playgroud)
有什么建议么?
我正在尝试使用Azure Maps API使用坐标搜索某个点周围的 POI,但我不知道如何通过添加Authorization和client-id来调用 API 。
\n\n这是我在 Microsoft 文档网站上尝试 API 时收到的请求预览。
\n\nGET https://atlas.microsoft.com/search/poi/json?api-version=1.0&query=university&lat=10.8232&lon=2.98234&limit=1\n\nAuthorization: Bearer eyJ0eXAiOiJKV1\xe2\x80\xa6\xe2\x80\xa6\n\nX-ms-client-id: SUXrtewLVItIG3X5\xe2\x80\xa6..\n
Run Code Online (Sandbox Code Playgroud)\n 我找不到在Angular中使用Azure Maps的任何支持,模块或文档。Azure Maps还是太新了,还不支持Angular吗?
我尝试了以下模块,但未成功:https : //www.npmjs.com/package/angular-azure-maps
我尝试按照Microsoft在其有关Azure地图(非角度)的文档中的说明进行操作,但是没有成功。
我正在使用Angular 5.2.9版本。
我有一个应用程序,它利用 Azure Maps 在地图上显示各个位置的图钉。一切都很好,但是当我缩小时,一些图钉会消失。当我放大时,它们又出现了。
有没有办法让地图即使在缩小时也不会隐藏图钉?我已将图层中的 iconOptions 设置为...
layer = new atlas.layer.SymbolLayer(datasource, null, {
iconOptions: {
ignorePlacement: true
},
});
Run Code Online (Sandbox Code Playgroud)
但这并没有真正帮助。
我有一个网站,它从服务器端获取一组点,然后使用azure-maps-control
npm 包渲染地图。
我希望地图以适合屏幕上所有点的方式居中和缩放。
实现这一目标的最佳方法是什么?
我在 Jupyter Notebook 中有一个 Azure Maps API 调用,该调用返回 .png 格式的地图图块。该调用效果很好,但我不知道如何将其显示为图像而不是二进制文本。
\n\n- API 调用:
\n\nimport requests\nfrom ipywidgets import Image\n\nurl = "https://atlas.microsoft.com/map/static/png"\n\nquerystring = {\n "api-version":"1.0",\n "subscription-key":"<myRedactedAPIkey>",\n "layer":"basic",\n "zoom":"5",\n "center":"-122.3950336,47.566848",\n "height":"600",\n "width":"600",\n "pins":"default||-121.95066667 45.9135|-121.062 46.707",\n "format":"png",\n "path":"ra300||-122.3950336 47.566848"\n}\n\npayload = ""\nheaders = {\n \'cache-control\': "no-cache"\n }\n\nresponse = requests.request("GET", url, data=payload, headers=headers, params=querystring)\n\nprint(response.text)\n
Run Code Online (Sandbox Code Playgroud)\n\n结果是:
\n\n\xef\xbf\xbdPNG\n\nIHDRX\xef\xbf\xbdf\xef\xbf\xbd\xef\xbf\xbdsRGB\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdgAMA\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbda pHYs\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdo\xef\xbf\xbdd\xef\xbf\xbd\xef\xbf\xbdIDATx^\xef\xbf\xbd\xef\xbf\xbdwt,K~\xef\xbf\xbd \xef\xbf\xbd2\xc3\x95YqGg4+\xef\xbf\xbdiGsVgGg5Z\xef\xbf\xbd\xd1\x9c]IT\xef\xbf\xbdRs9\\J\xe4\x88\xa44r$r%\xef\xbf\xbda\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdnv\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d\xef\xbf\xbd\xef\xbf\xbd@\xef\xbf\xbdJ\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdm=f\xef\xbf\xbdk&h\xef\xbf\xbd\xef\xbf\xbd^\xef\xbf\xbd\xef\xbf\xbdZ\xef\xbf\xbd\xef\xbf\xbdMs\xef\xbf\xbd\xef\xbf\xbd\xcc\x8a\\\xef\xbf\xbdJ\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdif\xef\xbf\xbd\xef\xbf\xbdC\xef\xbf\xbd\xef\xbf\xbd:2_ <etc.>\n
Run Code Online (Sandbox Code Playgroud)\n\n想:
\n\n\n\n有什么建议吗?谢谢。
\n\nEDIT2:这是有效的查询。感谢大家的帮助。
\n\nimport requests\nfrom IPython.display import Image, display\n\nurl = "https://atlas.microsoft.com/map/static/png"\npayload = ""\nquerystring = {\n "api-version":"1.0",\n "subscription-key":"<myApiKeyRedacted>",\n …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 API 获取地图上特定点(纬度、经度)的速度限制,但在 Azure Maps 文档中找不到它。我在 Bing 地图上找到了它,但如果可能的话,我想使用 Azure 地图,因为它们每月为您提供 25 万个地图免费请求。
谢谢!
azure-maps ×9
azure ×3
c# ×2
angular ×1
api ×1
bing-maps ×1
httpclient ×1
image ×1
ipywidgets ×1
javascript ×1
phonegap ×1
png ×1