Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-07-24
6
Medium Priority
?
145 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

886 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