{"id":1652,"date":"2021-08-09T16:46:19","date_gmt":"2021-08-09T07:46:19","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=1652"},"modified":"2021-08-09T19:13:20","modified_gmt":"2021-08-09T10:13:20","slug":"javascriptgoogle-map","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=1652","title":{"rendered":"JavaScript[Google Map]"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">API\u30ad\u30fc\u306e\u53d6\u5f97<\/h2>\n\n\n\n<p><a href=\"https:\/\/developers.google.com\/maps\/documentation\/javascript\/get-api-key?hl=ja\">web\u30b5\u30a4\u30c8<\/a><\/p>\n\n\n\n<p>\u5730\u56f3\u306e\u4e2d\u5fc3\u4f4d\u7f6e\u3092\u7def\u5ea6\u7d4c\u5ea6\u3067\u5909\u6570chuo\u306b\u4ee3\u5165\u3002<br>center\u3067\u5730\u56f3\u306e\u4e2d\u5fc3\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br>zoom\u3067\u30ba\u30fc\u30e0\u30ec\u30d9\u30eb\u306e\u5024\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br>position\u3067\u306f\u30de\u30fc\u30ab\u30fc\u3092\u8868\u793a\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>  &lt;script&gt;\n  function initMap() {\n   var chuo= {lat:35.7014, lng:139.7453};\n   var map = new google.maps.Map(document.getElementById(&#39;map&#39;), {\n    zoom: 16,\n    center: sotec\n   });\n   var marker = new google.maps.Marker({\n    position: sotec,\n    map: map\n   });\n  }\n  &lt;\/script&gt;<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u5168\u4f53<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;ja&quot;&gt;\n &lt;head&gt;\n  &lt;meta charset=&quot;utf-8&quot;&gt;\n  &lt;style&gt;\n  #map {\n   width: 100%;\n   height: 600px;\n   background-color: grey;\n  }\n  &lt;\/style&gt;\n  &lt;title&gt;\u5730\u56f3\u8868\u793a\u306e\u30b5\u30f3\u30d7\u30eb&lt;\/title&gt;\n &lt;\/head&gt;\n &lt;body&gt;\n  &lt;h3&gt;\u30bd\u30fc\u30c6\u30c3\u30af\u793e\u306e\u5834\u6240\u306e\u6848\u5185&lt;\/h3&gt;\n  &lt;div id=&quot;map&quot;&gt;&lt;\/div&gt;\n\n  &lt;script&gt;\n  function initMap() {\n   var sotec = {lat:35.7014, lng:139.7453};\n   var map = new google.maps.Map(document.getElementById(&#39;map&#39;), {\n    zoom: 16,\n    center: sotec\n   });\n   var marker = new google.maps.Marker({\n    position: sotec,\n    map: map\n   });\n  }\n  &lt;\/script&gt;\n\n  &lt;script async defer\n  src=&quot;https:\/\/maps.googleapis.com\/maps\/api\/js?key=YOUR_API_KEY&callback=initMap&quot;&gt;\n  &lt;\/script&gt;\n &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>API\u30ad\u30fc\u306e\u53d6\u5f97 web\u30b5\u30a4\u30c8 \u5730\u56f3\u306e\u4e2d\u5fc3\u4f4d\u7f6e\u3092\u7def\u5ea6\u7d4c\u5ea6\u3067\u5909\u6570chuo\u306b\u4ee3\u5165\u3002center\u3067\u5730\u56f3\u306e\u4e2d\u5fc3\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002zoom\u3067\u30ba\u30fc\u30e0\u30ec\u30d9\u30eb\u306e\u5024\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002position\u3067\u306f\u30de\u30fc\u30ab\u30fc\u3092\u8868\u793a\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e<\/p>\n","protected":false},"author":1,"featured_media":1654,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1652","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1652"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions"}],"predecessor-version":[{"id":1653,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions\/1653"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/1654"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}