Skip to content

Commit

Permalink
地图JS API安全密钥使用
Browse files Browse the repository at this point in the history
  • Loading branch information
simplezhli committed Feb 2, 2024
1 parent b48e8e1 commit 9f0e812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/shop/page/select_address_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class _AddressSelectPageState extends State<AddressSelectPage> {
/// 配置key
Flutter2dAMap.setApiKey(
iOSKey: '4327916279bf45a044bb53b947442387',
webKey: '4e479545913a3a180b3cffc267dad646',
webKey: 'c9446a164fd1245dd110b54114095303',
);
}

Expand Down
9 changes: 7 additions & 2 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
<!--高德地图-->
</script>
<!--高德地图 https://lbs.amap.com/api/javascript-api-v2/guide/abc/jscode -->
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: "71d62f39f1672a3469ee464ab1f4665f",
};
</script>
<script src="https://webapi.amap.com/loader.js"></script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
Expand Down

0 comments on commit 9f0e812

Please sign in to comment.