 |

08-27-2007, 10:47 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
target="_blank" Google Maps
Any idea why when I add target="_blank" to the link code into Google Map
balloons it disappears? I am trying to make it so the links inside the
balloons open in a new window, because it is not ideal to open a page
in the small map window. Not sure if their are many Google Maps pros out there.
Here is the map I created and embedded on my clients website:
Hawaiian Pool Builders Swimming Pool Directory for Ohio and Michigan
Thanks for your help.
|

08-27-2007, 11:32 PM
|
 |
WebProWorld Pro
|
|
Join Date: Oct 2006
Location: StudioKraft Creative Services
Posts: 105
|
|
Re: target="_blank" Google Maps
Hi Incrediblehelp,
Glancing at the code, it looks as though there is a Google Map embedded in an IFRAME on the page. This would require the use of target=”_top” to draw on the parent page, or as you have suggested, target=”_blank” to open another window/tab.
The Google Maps code itself is obfuscated, and is difficult to look through – it appears as though some sort of map generator was used to create it. Typically, markers are added to maps using the following javascript:
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(‘<a href=”url” target=”_blank”>Link</a>’);
Where “map” is the Google Map object. The JavaScript code seems to be using arrays to define the points, so there may not be a mechanism built-in to add the target parameter to the link URLs.
Hope that helps!
~D
|

08-27-2007, 11:38 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Thanks D. Yup I used the new Google My Maps feature and by-passed using the Maps API.
|

08-28-2007, 01:01 AM
|
 |
WebProWorld Pro
|
|
Join Date: Oct 2006
Location: StudioKraft Creative Services
Posts: 105
|
|
Re: target="_blank" Google Maps
I briefly looked through the new MyMaps feature of Google Maps and cannot find any settings or options that allow a target to be set for the links within the map.
I am used to using the Google Maps API which is more flexible than the MyMaps, but obviously much more difficult to use than MyMaps. Depending on the complexity of your map requirements, you may want to look into using the API as opposed to the MyMaps interface.
Failing that, there may be some HTML/JS trick to assign a target to the IFRAME itself. Setting a base target on your main page won't translate to the IFRAME, and the W3C spec does not allow for a target parameter within an IFRAME tag, so offhand I am not sure how to accomplish that, either. Perhaps there is a way to create a JavaScript object from the IFRAME and assign a target to it?
Hope that helps.
~D
|

08-28-2007, 01:00 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
D I have looked at the API and was setting the map up this way, but using My Maps is a lot easier, especially for the client to manage. Thanks for your feedback thus far. Any other ideas out there?
|

08-28-2007, 01:45 PM
|
 |
Moderator
|
|
Join Date: Jun 2006
Location: United States
Posts: 1,722
|
|
Re: target="_blank" Google Maps
I don't suppose you have a link to documentation for creating MyMaps maps do you? I did a few searches but couldn't find anything. Not sure if I need an account first or something.
|

08-28-2007, 02:33 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
wige maybe here?
Maps Help
|

08-28-2007, 03:48 PM
|
 |
Moderator
|
|
Join Date: Jun 2006
Location: United States
Posts: 1,722
|
|
Re: target="_blank" Google Maps
Now why couldn't I find that...
Anyway, I set up a test map and entering the points manually I was able to get it to accept the target="_blank" attribute. However they strip that tag when you log out. I think that this falls into their "suspicious tags" definition. Best thing I can think to try is using a javascript instead.
|

08-28-2007, 03:55 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Quote:
Originally Posted by wige
However they strip that tag when you log out. I think that this falls into their "suspicious tags" definition. Best thing I can think to try is using a javascript instead.
|
Yeah mine was stripped out to. I will play with JavaScript more.
|

08-28-2007, 05:58 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Spain
Posts: 331
|
|
Re: target="_blank" Google Maps
I don't know if this is any help to you, but if you look at
Map of Cartama, Malaga, Andalucia
the balloon on the left has a link to another site, which opens in another tab.
The whole page is created from a database.
If there is anything there that you want to use, or need clarification on, please ask.
Last edited by computergenius : 08-28-2007 at 05:59 PM.
Reason: spelling error
|

08-28-2007, 06:07 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Did you use the API or the new My Maps feature? Looks like the API to me. I am trying to figure it out when using the new My Maps feature.
|

08-28-2007, 06:42 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Spain
Posts: 331
|
|
Re: target="_blank" Google Maps
Quote:
Originally Posted by incrediblehelp
Did you use the API or the new My Maps feature? Looks like the API to me. I am trying to figure it out when using the new My Maps feature.
|
Yes, it's the API.
You seem to be determined to do it the hard way (:->
You say "using My Maps is a lot easier, especially for the client to manage" -
what is it that you want the client to be able to do?
And when you say client, I assume that you been the website owner?
|

08-28-2007, 06:49 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Yeah the website owner, so they add and change balloons, land marks, text and so forth. Maybe I need to look at the API again.
|

08-28-2007, 06:54 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Spain
Posts: 331
|
|
Re: target="_blank" Google Maps
I did that somewhere, a project that is "going to be finished one day". I will see what I can find, although I am not sure what the site owner could do - I know that they could slide a balloon around, and activate it, but I am not sure what else.
It works through a control panel page, and changes the data in a SQL database. All my pages on Hot Costa are built from databases.
Would that be any help to you?
|

08-28-2007, 07:30 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Well I just tried this Javascript method:
Code:
Click here for the <a href="http://www.hawaiianpoolbuilders.com/adrian-pools.html" onclick="return !window.open(this.href);">Adrian, Michgan Swimming Pool</a> page.
and that doesnt work either.
|

08-28-2007, 07:33 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
Pete mostly so they can edit themselves in the balloons. Don't want anything more "codie" than the My Maps set up or it will be to hard for them to edits on their own.
|

08-28-2007, 07:41 PM
|
 |
Moderator
|
|
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,597
|
|
Re: target="_blank" Google Maps
|

08-28-2007, 07:50 PM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,711
|
|
Re: target="_blank" Google Maps
KML is a file format used to display geographic data in an Earth browser, such as Google Earth, Google Maps, and Google Maps for mobile. KML uses a tag-based structure with nested elements and attributes and is based on the XML standard.
GoogleMapBuilder, a spreadsheet-to-map utility. The first DIY tool on the web that allows you to create an interactive Google Map on your website with "point-and-click" ease.
Google Mapplets are mini-applications that you can embed within the Google Maps
|

08-28-2007, 07:51 PM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,711
|
|
Re: target="_blank" Google Maps
Sorry posted twice, it's late and I off to bed.
|

08-29-2007, 03:29 AM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Spain
Post | | |