Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Google-Maps
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 14-Nov-12 6:39am
Edited 14-Nov-12 6:48am
ProgramFOX119.3K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think that everything you need is here:google maps api reference
  Permalink  
Comments
scorpion_dev at 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 at 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
0 OriginalGriff 254
1 Nirav Prabtani 223
2 Sergey Alexandrovich Kryukov 209
3 _Amy 165
4 Richard MacCutchan 135
0 OriginalGriff 7,799
1 Sergey Alexandrovich Kryukov 6,966
2 Maciej Los 3,994
3 Peter Leow 3,708
4 CHill60 2,742


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2014
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