Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a asp.net 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:

http://jsfiddle.net/4EaUw/[^]

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.

Scorpion

[Edit]Made able you can click on the link[/Edit]
Posted
Updated 14-Nov-12 6:48am
v2

I think that everything you need is here:google maps api reference
 
Share this answer
 
Comments
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.

Thanks,

Scorpion
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.
Hi,

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:
http://commconn.co.uk/2012/02/10/quick-tricks-with-google-maps-and-iframes/[^]

Thanks,

Scorpion
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900