Solved

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

Posted on 2016-07-24
6
93 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
Industry Leaders: 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!

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
T-SQL and CLR parameter strings 9 63
c#, datatable, aspx 4 48
ASP.NET Load html part first, then start function 2 38
Access-Control-Allow-Origin 4 41
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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