add Link button

85 views
Skip to first unread message

sana b

unread,
Nov 3, 2011, 8:20:27 PM11/3/11
to google-map...@googlegroups.com
Is there any way i can add or create a Link button on the top of my site just like maps.google.com we have on the top right corner three buttons, i.e., print, link etc.

purpose would be same like maps.google.com provide with its url button.


geoco...@gmail.com

unread,
Nov 4, 2011, 1:34:09 AM11/4/11
to Google Maps JavaScript API v3
If the map on your page implements the functionality to make the link
and restore the state of the map from the url query parameters, you
can do that.

Example:

http://www.geocodezip.com/v3_MW_example_linktomap.html?id=Marker%20One&lat=43.784976&lng=-81.018677&zoom=7&type=m

From Mike Williams' v2 tutorial here:
http://econym.org.uk/gmap/example_linktomarker.htm

ported to v3.

-- Larry

sana b

unread,
Nov 5, 2011, 5:16:24 PM11/5/11
to Google Maps JavaScript API v3
Thanks Lary,

The information is useful, but I want to create a link button on the
top of my Google map which is embedded on my site, and I want a
behaviour of that button (LINK) should be similar to maps.google.com
(like Google and yahoo LINK button provide), meaning when I click on
link button, it will show me the full URL keeping all the extents and
zoom size information.

Waiting for your reply

Atif


On Nov 4, 1:34 am, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Nov 3, 5:20 pm, sana b <sana.openmeeti...@gmail.com> wrote:
>
> > Is there any way i can add or create a Link button on the top of my site
> > just like maps.google.com we have on the top right corner three buttons,
> > i.e., print, link etc.
>
> > purpose would be same like maps.google.com provide with its url button.
>
> If the map on your page implements the functionality to make the link
> and restore the state of the map from the url query parameters, you
> can do that.
>
> Example:
>
> http://www.geocodezip.com/v3_MW_example_linktomap.html?id=Marker%20On...

Rossko

unread,
Nov 5, 2011, 6:03:33 PM11/5/11
to Google Maps JavaScript API v3
> The information is useful, but I want to create a link button on the
> top of my Google map which is embedded on my site, and I want a
> behaviour of that button (LINK) should be similar to maps.google.com
> (like Google and yahoo LINK button provide), meaning when I click on
> link button, it will show me the full URL keeping all the extents and
> zoom size information.

Are you expecting someone to write this for you, to your
specification?

There is an illustration of the necessary techniques here
http://econym.org.uk/gmap/linktothis.htm
It's a v2 API example but the same principles can be used with v3 Maps
API or any other webpage
Reply all
Reply to author
Forward
0 new messages