{"id":163,"date":"2022-03-26T17:43:08","date_gmt":"2022-03-26T17:43:08","guid":{"rendered":"https:\/\/priyodesign.com\/docs\/?post_type=docs&#038;p=163"},"modified":"2023-03-06T21:14:34","modified_gmt":"2023-03-06T21:14:34","slug":"google-maps-setup","status":"publish","type":"docs","link":"https:\/\/priyodesign.com\/docs\/mou-html\/google-maps-setup\/","title":{"rendered":"Google Maps Setup"},"content":{"rendered":"\n<p>To use the Google Maps service in the template, you need to obtain a personal <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">API<\/mark> Key from\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/console.cloud.google.com\/google\/maps-apis\/overview?pli=1\" target=\"_blank\">Google Cloud<\/a>. Google now requires a credit card to use map API Keys. After obtaining a valid API key follow the next steps to set up the map.<\/p>\n\n\n\n<div class=\"wp-block-group info-box-warning\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">\u26a0\ufe0f Demo API Key will not work on your website!<\/h4>\n\n\n\n<p>The API key used in the live demo will NOT work on your website! If you want to use Google Maps on your website, you need to get the API key first.<\/p>\n<\/div><\/div>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"priyo-docs-step wp-block-heading\"><img decoding=\"async\" class=\"wp-image-735\" style=\"width: 18px;\" src=\"https:\/\/priyodesign.com\/docs\/nijhum\/html\/wp-content\/uploads\/2022\/03\/tick-mark-solid.svg\" alt=\"Tick mark solid\"> Step 1<\/h4>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You need to edit every HTML template in a code editor. After opening the HTML template go to the bottom of the page where JS scripts are called. See the code below:<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre title=\"HTML\" class=\"wp-block-code\"><code lang=\"markup\" class=\"language-markup\">&lt;script src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=PASTE_YOUR_API_KEY_HERE\"&gt;&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"priyo-docs-step wp-block-heading\"><img decoding=\"async\" class=\"wp-image-735\" style=\"width: 18px;\" src=\"https:\/\/priyodesign.com\/docs\/nijhum\/html\/wp-content\/uploads\/2022\/03\/tick-mark-solid.svg\" alt=\"Tick mark solid\"> Step 2<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>To make your own Location, Zoom Level, Marker, and Company Title you need to open the <code>main.js<\/code> file in a code editor. The <code>main.js<\/code> file is located at &#8216;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">mou-template\/assets\/js\/<\/mark>&#8216;.<\/li>\n\n\n\n<li>You can find your location Latitude and Longitude <a rel=\"noreferrer noopener\" href=\"https:\/\/www.latlong.net\/\" target=\"_blank\">here<\/a> by entering a place name.<\/li>\n\n\n\n<li>After getting the <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">LatLong<\/mark> numbers just replace them to <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">mou-template<\/mark> <code>main.js<\/code> file by opening it in a code editor.<\/li>\n<\/ol>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre title=\"JavaScript\" class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">  \/\/ 33. Google Map\n  function basicmap() {\n      var mapOptions = {\n          zoom: 14, \/\/ You can change this\n          scrollwheel: false, \/\/ You can make it true or false\n          center: new google.maps.LatLng(-37.813629, 144.963058), \/\/ Replace these numbers to yours\n          ...\n          var mapElement = document.getElementById(\"map\");\n          var map = new google.maps.Map(mapElement, mapOptions);\n          var marker = new google.maps.Marker({\n              position: new google.maps.LatLng(-37.813629, 144.963058), \/\/ Again, replace these numbers to yours\n              map: map,\n              title: \"M O U\", \/\/ Give your own company Title inside of double quote\n              icon: \"https:\/\/res.cloudinary.com\/camicrouser\/image\/upload\/v1643792892\/Marker-MOU.png\",\n              \/\/ You can use a custom .png marker. Just replace the url of Marker\n          });\n      }<\/code><\/pre>\n\n\n\n<div class=\"wp-block-group info-box-tip\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\"><strong>\u2728 <\/strong>Change Map Styles?<\/h4>\n\n\n\n<p>You can generate and preview custom map styles from\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/snazzymaps.com\/\" target=\"_blank\">Snazzy Maps<\/a>\u00a0free online service. Then just replace the styles in the main.js Google Map styles.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To use the Google Maps service in the template, you need to obtain a personal API Key from\u00a0Google Cloud. Google now requires a credit card to use map API Keys. After obtaining a valid API key follow the next steps to set up the map. \u26a0\ufe0f Demo API Key will not work on your website! [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[14],"doc_tag":[],"class_list":["post-163","docs","type-docs","status-publish","hentry","doc_category-basic-setup"],"_links":{"self":[{"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/docs\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":30,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/docs\/163\/revisions"}],"predecessor-version":[{"id":652,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/docs\/163\/revisions\/652"}],"wp:attachment":[{"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/doc_category?post=163"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/priyodesign.com\/docs\/wp-json\/wp\/v2\/doc_tag?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}