Solved

Following an example - How do I change google map location?

Posted on 2016-07-24
6
61 Views
Last Modified: 2016-07-25
My boss bought a website template that comes with google map. The location is set to New York. We want to change it to St. Louis, MO.

I don't have the code ... my boss has it. He was plugging in some values, refreshing the page and the location was still showing New York

but I've been looking at some tutorials and examples and came across this.

http://www.w3schools.com/googleapi/google_maps_basic.asp

How do I get the longitude and latitude for a location? Do I need to get an key as well?
0
Comment
Question by:Camillia
  • 3
  • 3
6 Comments
 
LVL 5

Expert Comment

by:Eric C
ID: 41726918
The website template you purchased - is itan html template or a wordpress template? (or something else)?

If it's a wordpress template, most likely there is a page in the wp admin (in the theme's settings page) that allows you to enter in your address, and the API will automatically render the correct map)

If it's an html template, you'll need to look at the source and see what it's doing.

I've seen some html templates where the map is just hard-coded. Meaning they are only there to show how the page would look with a google map, but it's up to you to add the code to get it to work.

I've seen other html templates where the google map is displayed in an iframe. Look at the source code of the page, look for an iframe that includes 'maps.google.com' followed by a long string of code. That is the address. To find your address, open up a new browser window, go go https://maps.google.com and enter in your exact address and press the Enter key. Once the map is displayed, zoom in our out as you prefer and then look for the icon to show the embed code for the map as  you see it on the page.  Copy the code and then carefully paste it into our html file.

The google documentation will tell you how the google maps API works - but *how* it is implemented in the template you bought - that all depends on the author of the theme.  If you purchased the template from themeforest or template monster, both offer support. Since many other people probably bought that template as well, chances are good they have documentation for updating the map.
0
 
LVL 7

Author Comment

by:Camillia
ID: 41726940
It's HTML and my boss got it from template monster.

To find your address, open up a new browser window, go go https://maps.google.com and enter in your exact address and press the Enter key. Once the map is displayed, zoom in our out as you prefer and then look for the icon to show the embed code for the map as  you see it on the page.  Copy the code and then carefully paste it into our html file.

I type in the address. See the icon on the address but where's the code to copy??
0
 
LVL 5

Expert Comment

by:Eric C
ID: 41726944
open up the html file you purchased from template monster.  You need to know the name of the file that contains the google map.  For example, if it's a one-page scrolling website, it might be index.html, or if it's a separate page it might be called 'contact.html'.

Open that file in Dreamweaver, a plain text editor or your favorite code editor. Search for the string 'maps.google.com' and see what you find.

The FIRST step is to locate the EXISTING code in the template monster file. Let me know if you find that.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 7

Author Comment

by:Camillia
ID: 41726951
I'll take a look in the morning when I go to work. We opened it in VS 2015. I saw some code with coordinates that was in New York. We just need it to point to another location.

I'll check it in the morning again.

Just don't know where the embeded code that you refer to is.
0
 
LVL 5

Accepted Solution

by:
Eric C earned 500 total points
ID: 41726955
It's pretty straightforward, but Google hides the magic link.  After you are viewing the map in Google maps, click the hamburger icon at the top left (that's the button that looks like three horizontal lines stacked on top of each other), then select 'share or embed map'

here's a link with step by step instructions:
https://support.google.com/maps/answer/144361

and here's a screen shot that shows where the hamburger menu is located:
http://screencast.com/t/rZuWbB59
0
 
LVL 7

Author Comment

by:Camillia
ID: 41726958
Thanks, Eric. I'll try this in the morning and post back.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now