{"id":1221,"date":"2021-01-12T20:23:53","date_gmt":"2021-01-12T11:23:53","guid":{"rendered":"http:\/\/leenux.kr\/?p=1221"},"modified":"2021-01-13T11:33:55","modified_gmt":"2021-01-13T02:33:55","slug":"flutter-google-map-%ed%98%84%ec%9e%ac-%eb%82%b4-%ec%9c%84%ec%b9%98-%eb%9d%84%ec%9a%b0%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/leenux.kr\/?p=1221","title":{"rendered":"[Flutter] Google Map \ud604\uc7ac \ub0b4 \uc704\uce58 \ub744\uc6b0\uae30"},"content":{"rendered":"\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\">Flutter\uc5d0\uc11c Google Map\uc5d0 \ud604\uc7ac \ub0b4 \uc704\uce58 \ub744\uc6b0\uae30 \uc608\uc81c<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p class=\"has-text-color has-large-font-size has-very-dark-gray-color\"><strong>Google Map API \uc900\ube44<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><a href=\"https:\/\/console.cloud.google.com\/\"><strong>https:\/\/console.cloud.google.com\/<\/strong><\/a><\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\"><strong>API \ubc0f \uc11c\ube44\uc2a4 -&gt; \uc0ac\uc6a9\uc790 \uc778\uc99d \uc815\ubcf4 -&gt; \uc0ac\uc6a9\uc790 \uc778\uc99d \uc815\ubcf4 \ub9cc\ub4e4\uae30 -&gt; API \ud0a4 \uc0dd\uc131 \ud6c4 \ud0a4 \uc124\uc815<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"619\" src=\"https:\/\/leenux.kro.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-1024x619.png\" alt=\"\" class=\"wp-image-1222\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-1024x619.png 1024w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-300x181.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-768x464.png 768w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-830x502.png 830w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-230x139.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-350x212.png 350w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05-480x290.png 480w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-6.59.05.png 1792w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\"><strong>API Key \uc124\uc815<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\"><strong>\uac04\ub2e8\ud55c Google Map \uc608\uc81c\uc774\ubbc0\ub85c \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 \uc81c\ud55c\uc0ac\ud56d, API \uc81c\ud55c\uc0ac\ud56d \uc5c6\uc74c\uc73c\ub85c \uc9c4\ud589\ud558\uaca0\uc2b5\ub2c8\ub2e4.                                                         \ub9cc\uc57d \uc0c1\uc5c5\uc801, \ud300 \ud504\ub85c\uc81d\ud2b8\uc2dc Android, IOS \uac01\uac01 API KEY \uc0dd\uc131\ud6c4 \uadf8\uc5d0 \ub9de\ub294 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 \uc81c\ud55c\uc0ac\ud56d\uacfc API \uc81c\ud55c \uc0ac\ud56d\uc744 \uaf2d \uc124\uc815\ud560 \uac83! <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"620\" src=\"https:\/\/leenux.kro.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-1024x620.png\" alt=\"\" class=\"wp-image-1226\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-1024x620.png 1024w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-300x182.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-768x465.png 768w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-830x503.png 830w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-230x139.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-350x212.png 350w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54-480x291.png 480w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.54.54.png 1792w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>AndroidManifest.xml<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"595\" src=\"https:\/\/leenux.kro.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-1024x595.png\" alt=\"\" class=\"wp-image-1224\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-1024x595.png 1024w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-300x174.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-768x447.png 768w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-830x483.png 830w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-230x134.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-350x204.png 350w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35-480x279.png 480w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.23.35.png 1233w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\"><strong>IOS API \uc124\uc815<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>ios\/Runner\/AppDelegate.swift<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"475\" src=\"https:\/\/leenux.kro.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-1024x475.png\" alt=\"\" class=\"wp-image-1225\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-1024x475.png 1024w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-300x139.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-768x356.png 768w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-830x385.png 830w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-230x107.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-350x162.png 350w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56-480x223.png 480w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2021-01-12-\u110b\u1169\u1112\u116e-7.29.56.png 1108w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p class=\"has-text-color has-large-font-size has-very-dark-gray-color\"><strong>Flutter \uc704\uc82f \uad6c\ud604<\/strong> <\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\"><strong>Flutter \ud328\ud0a4\uc9c0 Location, google_maps_flutter \uc124\uce58<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/pub.dev\/packages\/google_maps_flutter\">https:\/\/pub.dev\/packages\/google_maps_flutter<\/a>, <a href=\"https:\/\/pub.dev\/packages\/location\">https:\/\/pub.dev\/packages\/location<\/a><\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>pubspec.yml \ud30c\uc77c \ucf54\ub4dc \ucd94\uac00<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>location: ^3.2.1 # \ud604\uc7ac \ub0b4\uc704\uce58\ngoogle_maps_flutter: ^1.0.10 # Google Map<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\ucf54\ub4dc<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import 'package:flutter\/material.dart';\nimport 'package:google_maps_flutter\/google_maps_flutter.dart';\nimport 'package:location\/location.dart';\n\nclass GoogleMapPage extends StatefulWidget {\n  String title;\n  GoogleMapPage({this.title});\n\n  @override\n  _GoogleMapPageState createState() => _GoogleMapPageState();\n}\n\nclass _GoogleMapPageState extends State&lt;GoogleMapPage> {\n\n  Location location;\n\n  @override\n  void initState() {\n    \/\/ TODO: implement initState\n    super.initState();\n    location = Location();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: FutureBuilder(\n        future: location.getLocation(),\n        builder: (BuildContext context, AsyncSnapshot&lt;LocationData> _) {\n          if(!_.hasData){ \/\/\/ \ud604\uc7ac \ub0b4 \uc704\uce58\ub370\uc774\ud130\uac12\uc774 null\uacbd\uc6b0 \ub85c\ub529 \n            return Center(\n              child: CircularProgressIndicator(),\n            );\n          }\n          return GoogleMap(\n              initialCameraPosition: CameraPosition(\n                  target: LatLng(_.data.latitude, _.data.longitude),\n                  zoom: 16,\n              ),\n            onTap: (_){\n\n            },\n            myLocationEnabled: true,\n            myLocationButtonEnabled: true,\n            circles: Set.from([Circle(\n              circleId: CircleId(\"location\"),\n              center: LatLng(_.data.latitude, _.data.longitude),\n              strokeWidth: 1,\n              \/\/strokeColor: Colors.blue[200],\n              radius: 500,\n            )]),\n          );\n        },)\n    );\n  }\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" src=\"https:\/\/leenux.kro.kr\/wp-content\/uploads\/2021\/01\/image.png\" alt=\"\" class=\"wp-image-1227\" width=\"209\" height=\"465\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/image.png 432w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/image-135x300.png 135w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/image-230x511.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2021\/01\/image-350x778.png 350w\" sizes=\"(max-width: 209px) 100vw, 209px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flutter\uc5d0\uc11c Google Map\uc5d0 \ud604\uc7ac \ub0b4 \uc704\uce58 \ub744\uc6b0\uae30 \uc608\uc81c<\/p>\n","protected":false},"author":1,"featured_media":1001,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221"}],"collection":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1221"}],"version-history":[{"count":3,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions\/1230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/media\/1001"}],"wp:attachment":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}