Tue. Jul 2nd, 2024

13. Magento. How to change Google Map location (Home page)

1 min read

In order to change map location on home page, you should perform the following:

Step 1. Locate the Google Map code in the template.

  1. Log into your Magento Admin.
  2. Navigate to CMS -> Static Blocks.
  3. Open the home_map static block and you will see the following piece of code for the Map:

    Magento.-How-to-change-Google-Map-location-Home-page1

Step 2. Set Latitude and Longitude for the location:

  1. Go to Google Maps Site.
  2. Find your location, right click it. Select ‘What’s Here’ option from the drop down menu:
    How-to-change-map-location-on-home-page21
  3. With that done you will see the Latitude and Longitude of the location on the left of the page:

    Magento.-How-to-change-Google-Map-location-Home-page3

Step 3. Replace the default Latitude and Longitude with yours in CMS -> Static Blocks -> home_map:
Magento.-How-to-change-Google-Map-location-Home-page4

Note: The following line of code for the map:

var markCoord1 = new google.maps.LatLng(parseFloat(40.6422180), parseFloat(-73.9784068,14));

stands for the Google Map marker Latitude and Longtitude.

 

July 2024
M T W T F S S
« Jun    
1234567
891011121314
15161718192021
22232425262728
293031