question re google maps

Hi guys, on my page here http://burgessgalvin.ie/new/?page_id=601 the maps shows perfect, however i am using the same code here http://burgessgalvin.ie/new/#find_us but it shows a much more zoomed out version, any ideas???
jonathanduane2010Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerCommented:
While the google maps code is the same, the outside code is not:

One page:
width="400" height="350"
Other page:
width="740" height="330"
0
Pravin AsarPrincipal Systems EngineerCommented:
If you want to control the zoom factor irrespective of iframe size, add url parameter "z"

for example:

      <p>Big Iframe</p>
      <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2378.9425816737826!2d-6.292313!3d53.397966999999994!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48670cf473178fe5%3A0x425005cfbea3df89!2sBurgess+Galvin!5e0!3m2!1sen!2s!4v1429706909234&z=5" width="740" height="330" frameborder="0"></iframe>
      
      <p>Small Iframe</p>
      <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2378.9425816737826!2d-6.292313!3d53.397966999999994!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48670cf473178fe5%3A0x425005cfbea3df89!2sBurgess+Galvin!5e0!3m2!1sen!2s!4v1429706909234&z=5" width="400" height="200" frameborder="0"></iframe>
0
F PCommented:
Are you using an iframe or are you setting it in Javascript? I use code where I put a <div> element on the HTML and in my javascript template do this:

/* in my html */
<div id="googleMap"></div>


/* in one js file */
template.createGoogleMaps('googleMap');


/* in another js file */
/******************************************************************************/

Template.prototype.createGoogleMaps=function(id)
{
	if($('#'+id).length)
	{
		var coordinate=new google.maps.LatLng($options.googleMap.coordinates_lat,$options.googleMap.coordinates_lng);

		var mapOptions=
		{
			zoom				:	15,
			center				:	coordinate,
			draggable			:	false,
			scrollwheel			:	false,
			mapTypeControl		:	false,
			streetViewControl	:	false,
			zoomControlOptions	:
			{
				position		:	google.maps.ControlPosition.RIGHT_CENTER
			},
			panControlOptions:
			{
				position		:	google.maps.ControlPosition.LEFT_CENTER
			},
			mapTypeId			:	google.maps.MapTypeId.ROADMAP,
			styles				:
			[
				{
					stylers		:
					[
						{
							saturation	:	-100
						}
					]
				}
			]
		};

		var googleMap=new google.maps.Map(document.getElementById(id),mapOptions);

		var markerOptions=
		{
			map					:	googleMap,
			position			:	coordinate,
			icon				:	'img/map_pointer.png'
		}

		new google.maps.Marker(markerOptions);

		$(window).resize(function()
		{
			var center=googleMap.getCenter();
			google.maps.event.trigger(googleMap,'resize');
			googleMap.setCenter(center);
		});
	}
};

/******************************************************************************/

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

F PCommented:
Oh yeah, I forgot I include the api from google and set my lat long externally in an options file too



<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
0
jonathanduane2010Author Commented:
Hi Pravin,

It looks fine when you click into the page, but when you view the "find us" tab it doesnt show the zoomed version
0
F PCommented:
They both appear with the same zoom level on my system. Try to empty your cache or try another browser and see if it still does that for you. You can also disable scroll wheel zoom like described here to prevent zooming:

http://stackoverflow.com/questions/21992498/is-it-possible-to-disable-mouse-scroll-wheel-zoom-on-embedded-google-maps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pravin AsarPrincipal Systems EngineerCommented:
&z=5 should show the appropriately iirespective of iframe size

Before posting solution, I did test.

Here is my test code. See the maps side by side.
Just clean the cache or session

<html>
<body>
      <p>Big Iframe</p>
      <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2378.9425816737826!2d-6.292313!3d53.397966999999994!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48670cf473178fe5%3A0x425005cfbea3df89!2sBurgess+Galvin!5e0!3m2!1sen!2s!4v1429706909234&z=5" width="740" height="330" frameborder="0"></iframe>
      
      <p>Small Iframe</p>
      <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2378.9425816737826!2d-6.292313!3d53.397966999999994!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x48670cf473178fe5%3A0x425005cfbea3df89!2sBurgess+Galvin!5e0!3m2!1sen!2s!4v1429706909234&z=5" width="400" height="200" frameborder="0"></iframe>
      </body>
</html>
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.