Google Maps Setup

To use the Google Maps service in the template, you need to obtain a personal API Key from Google Cloud. Google now requires a credit card to use map API Keys. After obtaining a valid API key follow the next steps to setup the map.

⚠️ Demo API Key will not work on your website!

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.

Tick mark solid Step 1

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:

<script src="https://maps.googleapis.com/maps/api/js?key=PASTE_YOUR_API_KEY_HERE"></script>

Tick mark solid Step 2

  1. To make your own Location, Zoom Level, Marker, and Company Title you need to open the main.js file in a code editor. The main.js file is located at ‘nijhum-template/assets/js/‘.
  2. You can find your location Latitude and Longitude here by entering a place name.
  3. After getting the LatLong numbers just replace them to nijhum-template main.js file by opening it in a code editor.
// 19. Google Map
  function basicmap() {
    let mapOptions = {
      zoom: 13,
      scrollwheel: false,
      center: new google.maps.LatLng(40.712776, -74.005974), // New York
      // This is where you would paste any style found on Snazzy Maps.
      ...
      // End styles
    };
    let mapElement = document.getElementById("map");
    let map = new google.maps.Map(mapElement, mapOptions);
    let marker = new google.maps.Marker({
      position: new google.maps.LatLng(40.712776, -74.005974),
      map: map,
      title: "Nijhum",
      icon: "...png",
    });
  }

ℹ️ Change Map Styles?

You can generate and preview custom map styles from Snazzy Maps free online service. Then just replace the styles in the main.js Google Map styles.