Solved

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

Posted on 2016-07-24
6
104 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

624 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