Reputation: 39
I have this problem for several web sites. I am building this contact page for the site - http://bellated.us.lt/kontaktai-2/ What I want to do is that on load this google maps address tip should be in the middle and visible. Now it is somewhere upper and I have to scroll in order to see it. Any ideas on how to overcome this?
Thanks.
I am using such iframe:
<iframe width="410" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=lt&geocode=&q=s.konarskio+49,+vilnius+adverum&aq=&sll=54.67742,25.249747&sspn=0.036425,0.077162&ie=UTF8&hq=s.konarskio+49,+vilnius+adverum&hnear=&ll=54.67742,25.249747&spn=0.036425,0.077162&t=m&output=embed"></iframe><br /><small><a class="linkedin" href="http://maps.google.com/maps?f=q&source=embed&hl=lt&geocode=&q=s.konarskio+49,+vilnius+adverum&aq=&sll=54.67742,25.249747&sspn=0.036425,0.077162&ie=UTF8&hq=s.konarskio+49,+vilnius+adverum&hnear=&ll=54.67742,25.249747&spn=0.036425,0.077162&t=m" style="color:#0000FF;text-align:left">Didinti žemėlapį</a></small>
Upvotes: 2
Views: 1060
Reputation: 5272
Use panTo(latLng:LatLng) and pan map so that current point will be located somewhere in the lower part of google maps window
@user1149048
I Thaugth that you're usng google maps API in you're case you have to adjust ll param
“ll” stands for Latitude,longitude of a Google Map center – Note that the order has to be latitude first, then longitude and it has to be in decimal format.
EXAMPLE:
YOU'RE LINK
Where do you get lat,lng of marker that you put on the map. From this position you have to add/subtract some minor value.
Upvotes: 1
Reputation: 4404
Two options:
1) Edit the first part of the ll parameter (latitude) to be 54.69300, which centers your map slightly lower. You can adjust this value to taste.
<iframe width="410" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=lt&geocode=&q=s.konarskio+49,+vilnius+adverum&aq=&sll=54.67742,25.249747&sspn=0.036425,0.077162&ie=UTF8&hq=s.konarskio+49,+vilnius+adverum&hnear=&ll=54.69300,25.249747&spn=0.036425,0.077162&t=m&output=embed"></iframe>
2) Add &iwloc=0
to the end of the src. This will hide the balloon by default.
<iframe width="410" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=lt&geocode=&q=s.konarskio+49,+vilnius+adverum&aq=&sll=54.67742,25.249747&sspn=0.036425,0.077162&ie=UTF8&hq=s.konarskio+49,+vilnius+adverum&hnear=&ll=54.67742,25.249747&spn=0.036425,0.077162&t=m&output=embed&iwloc=0"></iframe>
See them in action here: http://jsfiddle.net/chad/w2zLv/
Upvotes: 3