Click here to Skip to main content
13,147,044 members (63,542 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have a web site which has a Google map in the page. I used the iframe code which we get from Google map link when we give an address. Here is the jsfiddle of the code:[^]

It is working fine but, I have two issues here,

This might be simple issues but I am not able to figure out.
First one is when we click on the directions link on the info box, it opens the map in the same page. I want to open the map in different window. How can I achieve that?

Secondly, is there any way we can just show the map marker but not the info box when page is loaded. I want to open the info box when we click on the map marker.

Also, can we achieve this by this iframe code or do we need to use google maps api?

Thanks in advance.


[Edit]Made able you can click on the link[/Edit]
Posted 14-Nov-12 6:39am
Updated 14-Nov-12 6:48am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


I found the solution for the second question.

We can remove the info box by default by adding "&iwloc=near" at the end of the iFrame source Url.

Check the below link for more details:[^]


Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think that everything you need is here:google maps api reference
scorpion_dev 14-Nov-12 15:01pm
Thank you podbielski for the reply.
I was wondering that is there any way we can do it in the iFrame code? If not, I will use the Google maps api.


n.podbielski 14-Nov-12 16:31pm
For the first question: I don't know. You must address documentation.
For the second: I remember options in JS Api for customization of markers so it is possible.

An in general as it is google software I don't know how it's licensing covers customization beyond API. You should read some info about that to. It could be dangerous if you break some rules.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100