Google maps σε site

Κώδικας, πληροφορίες, ερωτήσεις και απαντήσεις σχετικές με την JavaScript.

Συντονιστές: WebDev Moderators, Super-Moderators

Απάντηση
Panos09
Δημοσιεύσεις: 4
Εγγραφή: 31 Μαρ 2009 15:46
Επικοινωνία:

Google maps σε site

Δημοσίευση από Panos09 » 13 Απρ 2009 16:13

Καλησπέρα θα ήθελα να ρωτήσω πως μπορώ να βάλω στο site μου google maps ώστε να φαίνεται που είναι το μαγαζί μου.
(Όσο πιο απλό είναι τόσο καλήτερα)

Ευχαριστώ εκ των προτέρων για τις απαντήσεις......!!!

Άβαταρ μέλους
fiskilis
Honorary Member
Δημοσιεύσεις: 14095
Εγγραφή: 16 Νοέμ 2003 22:44
Τοποθεσία: Athens
Επικοινωνία:

Google maps σε site

Δημοσίευση από fiskilis » 13 Απρ 2009 16:48

να εχεις έναν λογαριασμο google και να φτιαξεις τον χαρτη μολις τελειωσεις περνεις τον κωδικα που σου δινει και το βαζεις στην σελιδα σου

αν δεν τα καταφερεις στειλε pm και στο φτιαχνω 10 λεπτα δουλια ειναι !

Άβαταρ μέλους
Kainourios
Ruby Moderator
Δημοσιεύσεις: 504
Εγγραφή: 18 Μάιος 2005 16:20
Τοποθεσία: Κορυδαλλός
Επικοινωνία:

Google maps σε site

Δημοσίευση από Kainourios » 13 Απρ 2009 17:08

Εδώ θα βρεις ένα videaki που δείχνει πώς.
css-tricks.com/video-screencasts/34-integrating-and-customizing-google-maps/

Άβαταρ μέλους
fafos
Script Master
Δημοσιεύσεις: 6234
Εγγραφή: 30 Νοέμ 2004 03:09

Google maps σε site

Δημοσίευση από fafos » 13 Απρ 2009 17:15

1. pas edo http://code.google.com/intl/el-GR/apis/maps/signup.html kai pairneis to API key


2. Pas edo kai dineis dieuthynsh kai polh: http://pagesperso-orange.fr/universimmedia/geo/loc.htm

apo kato tha sou vgalei 2 noumera: Latitude kai Longitude

kratas auta ta noumera gia meta... an den sou vgazei apotelesma me thn odo kai polh prepei na psakseis ton xarth kai na kaneis klik epano sto shmeio pou einai to magazi gia na pareis ta Latitude kai Longitude


3. Vazeis auton ton kodika ston header ths selidas sou:

Κώδικας: Επιλογή όλων

    
    <script src="http&#58;//maps.google.com/maps?file=api&amp;v=2&amp;key=EDO VAZEIS TO API KEY POY PHRES APO THN EGGGRAFH SOY"
            type="text/javascript"></script>


<script type="text/javascript">

    function initialize&#40;&#41; &#123;
      if &#40;GBrowserIsCompatible&#40;&#41;&#41; &#123;
        var map = new GMap2&#40;document.getElementById&#40;"map_canvas"&#41;&#41;;
        map.setCenter&#40;new GLatLng&#40;LATITUDE,LONGITUTE&#41;, 15&#41;;
	map.addControl&#40;new GLargeMapControl&#40;&#41;&#41;;
	var html = "EPONYMIA DIEYTHYNSH KLP";

        map.openInfoWindow&#40;map.getCenter&#40;&#41;,

                           document.createTextNode&#40;html&#41;&#41;;
      &#125;
    &#125;

    </script>
Allakse ta parakato:

EDO VAZEIS TO API KEY POY PHRES APO THN EGGGRAFH SOY : grapse to api key..

LATITUDE: grapse ton proto arithmo ( Latitude ) pou phres apo thn forma
LONGITUTE: grapse ton deutero arithmo ( Longitude ) pou phres apo thn forma

EPONYMIA DIEYTHYNSH KLP: Grapse (aplo keimeno) thn eponymia tou magaziou dieythynsh kai oti allo thes


4. Antikatestthse to <body> thse selidas pou tha exei ton xarth me auto:

Κώδικας: Επιλογή όλων

  <body onload="initialize&#40;&#41;" onunload="GUnload&#40;&#41;">

5. Vale ton parakato kodika sto shmeio pou thes na emfanizetai o xarths:

Κώδικας: Επιλογή όλων

 <div id="map_canvas" style="width&#58;500px; height&#58; 300px;font-size&#58;12px;font-weight &#58; bold; color &#58; navy;"></div>

"Paikse" me tis diastaseis kai to style pou thes gia ton xarth sou kai eisai etoimos...

des ena paradeigma: http://www.istopoli.com/cruise/point.php?id=2
Οι πάνες και οι πολιτικοί πρέπει να αλλάζονται συχνά για τον ίδιο λόγο...

Άβαταρ μέλους
Basilakis
PHP Moderator
Δημοσιεύσεις: 8574
Εγγραφή: 17 Νοέμ 2003 13:03
Τοποθεσία: Womans' Brain
Επικοινωνία:

Google maps σε site

Δημοσίευση από Basilakis » 13 Απρ 2009 19:21

Αυτά που λέει ο Fafos και ρίξε μία ματιά εδώ

http://www.webresourcesdepot.com/displa ... rasticmap/

Panos09
Δημοσιεύσεις: 4
Εγγραφή: 31 Μαρ 2009 15:46
Επικοινωνία:

Google maps σε site

Δημοσίευση από Panos09 » 13 Απρ 2009 20:03

Ευχαριστώ πολύ με βοηθήσατε αρκετά...........!.!.!.!.!.!.!.!

Άβαταρ μέλους
Basilakis
PHP Moderator
Δημοσιεύσεις: 8574
Εγγραφή: 17 Νοέμ 2003 13:03
Τοποθεσία: Womans' Brain
Επικοινωνία:

Google maps σε site

Δημοσίευση από Basilakis » 30 Απρ 2009 16:54

hmmm...

έχω το εξλης πρόβλημα, ερώτημα...

δημιούργησα το χάρτη μου μέσα απο τα maps, έβαλα το spot μου αλλα ο κώδικας που πέρνω είναι σε iframe :D

Κώδικας: Επιλογή όλων

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http&#58;//www.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=116595104314630151072.000468c01767e2f53ed9b&amp;ll=40.611598,22.985572&amp;spn=1.142699,2.120361&amp;output=embed"></iframe><br /><small>Προβολή <a href="http&#58;//www.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=116595104314630151072.000468c01767e2f53ed9b&amp;ll=40.611598,22.985572&amp;spn=1.142699,2.120361&amp;source=embed" style="color&#58;#0000FF;text-align&#58;left">Elysee Cafe</a> σε χάρτη μεγαλύτερου μεγέθους</small>
θα προτιμούσα βέβαια να μην έχω iframes, τι παίζει με αυτά;

Άβαταρ μέλους
EneMe
Super Moderator
Δημοσιεύσεις: 13308
Εγγραφή: 09 Ιούλ 2002 13:29
Τοποθεσία: Στο κέντρο της Ελλάδας!
Επικοινωνία:

Google maps σε site

Δημοσίευση από EneMe » 30 Απρ 2009 17:42

Σε joomla πώς μπαίνει;

Ως κώδικας σε άρθρο δηλαδή...

Γιατί δεν πιστεύω να πρέπει να φορτώνεται το script μέσα από το template σε κάθε σελίδα τσάμπα...

Άβαταρ μέλους
Basilakis
PHP Moderator
Δημοσιεύσεις: 8574
Εγγραφή: 17 Νοέμ 2003 13:03
Τοποθεσία: Womans' Brain
Επικοινωνία:

Google maps σε site

Δημοσίευση από Basilakis » 30 Απρ 2009 17:53

Σε Joomla ενωείς σε κατάλογο με διαφορετικά sites που έχει διαφορετικές περιοχές;

η απλώς για μία μόνο περιοχή, με ένα μόνο mark?

Γιατι με το iframe Που έδωσα πας εδώ

http://maps.google.com/

επιλέγες οι χάρτες μου, κάνεις νέο χάρτη, βάζεις και ένα point και είσαι πούδρα :lol:

Άβαταρ μέλους
EneMe
Super Moderator
Δημοσιεύσεις: 13308
Εγγραφή: 09 Ιούλ 2002 13:29
Τοποθεσία: Στο κέντρο της Ελλάδας!
Επικοινωνία:

Google maps σε site

Δημοσίευση από EneMe » 30 Απρ 2009 18:42

Για κάποιον μαγικό λόγο δεν μου δέχεται στον editor το iframe...

Άβαταρ μέλους
manolism
Super Moderator
Δημοσιεύσεις: 6652
Εγγραφή: 25 Ιαν 2004 16:01
Τοποθεσία: Wild West
Επικοινωνία:

Google maps σε site

Δημοσίευση από manolism » 30 Απρ 2009 19:16

Απενεργοποίησε τον editor από τις βασικές ρυθμίσεις και θα σου δεχθεί τον κώδικα

Άβαταρ μέλους
fafos
Script Master
Δημοσιεύσεις: 6234
Εγγραφή: 30 Νοέμ 2004 03:09

Google maps σε site

Δημοσίευση από fafos » 30 Απρ 2009 19:45

Basilakis έγραψε:hmmm...

έχω το εξλης πρόβλημα, ερώτημα...

δημιούργησα το χάρτη μου μέσα απο τα maps, έβαλα το spot μου αλλα ο κώδικας που πέρνω είναι σε iframe :D

Κώδικας: Επιλογή όλων

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http&#58;//www.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=116595104314630151072.000468c01767e2f53ed9b&amp;ll=40.611598,22.985572&amp;spn=1.142699,2.120361&amp;output=embed"></iframe><br /><small>Προβολή <a href="http&#58;//www.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=116595104314630151072.000468c01767e2f53ed9b&amp;ll=40.611598,22.985572&amp;spn=1.142699,2.120361&amp;source=embed" style="color&#58;#0000FF;text-align&#58;left">Elysee Cafe</a> σε χάρτη μεγαλύτερου μεγέθους</small>
θα προτιμούσα βέβαια να μην έχω iframes, τι παίζει με αυτά;

Kane ta parakato:


Sose ton parakato kodika se ena arxeio me titlo gmaps.js

Κώδικας: Επιλογή όλων

/*
 PdMarker

 Purpose&#58; extends Google Map API GMap and GMarker &#40;hover effects, image swapping, moving&#41;
 Details&#58; http&#58;//www.pixeldevelopment.com/pdmarker.asp
 Updated&#58; &#91;see getPdMarkerRevisionInfo&#93;
 Author&#58;  Peter Jones
 Notes&#58;   Relies on undocumented features of the Google Map API which may change.
	    Based on my own PJToolTip and ideas from GxMarker, TLabel and the Google Maps API forum.

 Contact http&#58;//www.pixeldevelopment.com for your custom Google Map needs
*/

function getPdMarkerRevisionInfo&#40;&#41; &#123;
var cr = "<br/>";
var s =
"2.03  10/02/07 - fixed zindex bug &#40;setMarkerZIndex, topMarkerZIndex&#41;" + cr + 
"2.02  05/22/07 - fixed minor issues &#40;blink, initDetailWin&#41;" + cr + 
"2.01  04/29/07 - improved left hand side detail window positioning, uses new Google setImage &amp; show " + 
"routines for added reliability, fixed zoomToMarkers for single marker case." + cr +
"2.00  04/22/07 - fix for setImage when using Explorer 7." + cr +
"1.99f 07/09/06 - zoomToMarkers now takes into account markers not displayed." + cr +
"1.99e 05/05/06 - fixed zoomed tooltip positioning &amp; non-centered marker graphics." + cr +
"1.99d 05/01/06 - fixed display &amp; blink when defining .transparent." + cr +
"1.99c 04/25/06 - added display and blink." + cr +
"1.99b 04/21/06 - added 'Powered By' version &amp; marker count display." + cr +
"1.99a 04/18/06 - revised for Google Maps API Version 2, GMap2 required." + cr +
"0.99c 01/30/06 - added setDetailWinClass and resetDetailWinClass." + cr +
"0.99a 10/12/05 - now handles maps in containers with undefined widths" + cr +
"define a div with id 'pdmarkerwork' to reduce flicker" + cr +
"0.99  10/03/05 - added setImageEnabled, allowLeftTooltips &#40;global&#41;" + cr +
"0.98  09/30/05 - fixed zoomToMarkers" + cr +
"0.97  09/24/05 - added setHoverImage, setShowDetailOnClick, setDetailWinHTML, showDetailWin, closeDetailWin" + cr +
"0.96  09/22/05 - added setTooltipHiding, getTooltipHiding" + cr +
"0.95  09/20/05 - handle zoom for lingering tooltips mouseOutEnabled&#40;false&#41; " +
		   "disables setImage and restoreImage" + cr +
"0.94  09/20/05 - added setTooltipClass and resetTooltipClass" + cr +
"0.93  09/19/05 - added slopPercentage &#91;optional&#93; parameter to zoomToMarkers" + cr +
"0.92  09/18/05 - added getMouseOutEnabled, setMouseOutEnabled" + cr +
"0.91  09/17/05 - fixed setOpacity";
return s;
&#125;

function getPdMarkerVersion&#40;&#41; &#123;
	return getPdMarkerRevisionInfo&#40;&#41;.substring&#40;0,15&#41;;
&#125;

function getPdMarkerShortVersion&#40;&#41; &#123;
	return getPdMarkerRevisionInfo&#40;&#41;.substring&#40;0,5&#41;;
&#125;

var APIkey = "";

function getGoogleMapsVersion&#40;&#41; &#123;
	var i, a, b, c;
	var v = "unknown";

	if &#40;document.getElementsByTagName&#41;
		for&#40;i=0; &#40;a = document.getElementsByTagName&#40;"script"&#41;&#91;i&#93;&#41;; i++&#41;
			if&#40;a.getAttribute&#40;"src"&#41;&#41;
			&#123;
				b = a.getAttribute&#40;"src"&#41;;
				c = b.indexOf&#40;"/mapfiles/maps"&#41;; // /mapfiles/maps
				d = b.indexOf&#40;"http&#58;//maps.google.com/maps?file=api"&#41;;
				e = b.indexOf&#40;"key="&#41;;
				f = b.indexOf&#40;"/mapfiles/"&#41;;
				g = b.indexOf&#40;"/maps"&#41;;
				if &#40;c > 0&#41;
					v = parseFloat&#40;b.substring&#40;c+14&#41;&#41;;
				else if &#40;f > 0&#41;
					v = "2." + b.substring&#40;f+10,g&#41;;
				if &#40;d >= 0&#41;
					if &#40;e > 0&#41;
						APIkey = b.substring&#40;e+4&#41;;
			&#125;
	return v;
&#125;

function latLongToPixel&#40;map,coord,zoom&#41; &#123;
    return map.fromLatLngToDivPixel&#40;coord&#41;;
&#125;


var pdMarkerExtList = &#91;&#93;;

function PdMarkerAddToExtList&#40;marker&#41; &#123;
	pdMarkerExtList.push&#40;marker&#41;;
&#125;

function PdMarkerRemoveFromExtList&#40;id&#41; &#123;
	for &#40;var i=0; i<pdMarkerExtList.length; i++&#41;
		if &#40;pdMarkerExtList&#91;i&#93;.internalId == id&#41;
			pdMarkerExtList.splice&#40;i,1&#41;;
&#125;

function PdMarkerFindInExtList&#40;id&#41; &#123;
	for &#40;var i=0; i<pdMarkerExtList.length; i++&#41;
		if &#40;pdMarkerExtList&#91;i&#93;.internalId == id&#41;
			return pdMarkerExtList&#91;i&#93;;
&#125;

function PdMarkerClose&#40;id&#41; &#123;
	for &#40;var i=0; i<pdMarkerExtList.length; i++&#41;
		if &#40;pdMarkerExtList&#91;i&#93;.internalId == id&#41;
			&#123;
				pdMarkerExtList&#91;i&#93;.closeDetailWin&#40;&#41;;
				pdMarkerExtList.splice&#40;i,1&#41;;
			&#125;
&#125;

function PdMarkerBlinkOnOff&#40;id&#41; &#123;
	var marker = PdMarkerFindInExtList&#40;id&#41;;
	if &#40;marker&#41;
	&#123;
		if &#40;!marker.blinking&#41; return;
		marker.blinkOn = !marker.blinkOn;
		marker.display&#40;marker.blinkOn&#41;;
		setTimeout&#40;"PdMarkerBlinkOnOff&#40;" + marker.getId&#40;&#41; + "&#41;;", marker.blinkSpeed&#41;;
	&#125;
&#125;

// GMap extension for walking through PdMarker list
// Note&#58; some overlays are not markers, some may not be PdMarkers

function isPdMarker&#40;a&#41; &#123;
	if &#40;a.isMarker&#41;
		return true;		
	return false;
&#125;

function getPdMarkerCount&#40;a&#41; &#123;
	if &#40;a.pdMarkers&#41;
		return a.pdMarkers.length;
	return 0;
&#125;

GMap2.prototype.getMarkerById = function&#40;id&#41; &#123;
	var count = getPdMarkerCount&#40;this&#41;;
	for &#40;var i = 0; i < count; i++&#41;
		if &#40;isPdMarker&#40;this.pdMarkers&#91;i&#93;&#41;&#41;
			if &#40;this.pdMarkers&#91;i&#93;.internalId == id&#41;
			&#123;
				this.cursor = i;
				return this.pdMarkers&#91;i&#93;;
			&#125;
	return null;
&#125;

GMap2.prototype.getFirstMarker = function&#40;&#41; &#123;
	var count = getPdMarkerCount&#40;this&#41;;
	for &#40;var i = 0; i < count; i++&#41;
		if &#40;isPdMarker&#40;this.pdMarkers&#91;i&#93;&#41;&#41;
		&#123;
			this.cursor = i;
			return this.pdMarkers&#91;i&#93;;
		&#125;
	return null;
&#125;

GMap2.prototype.getNextMarker = function&#40;&#41; &#123;
	var count = getPdMarkerCount&#40;this&#41;;
	if &#40;count > 0&#41;
		if &#40;this.cursor >= 0&#41;
			for &#40;var i = this.cursor+1; i < count; i++&#41;
				if &#40;isPdMarker&#40;this.pdMarkers&#91;i&#93;&#41;&#41;
				&#123;
					this.cursor = i;
					return this.pdMarkers&#91;i&#93;;
				&#125;
	return null;
&#125;

GMap2.prototype.getNthMarker = function&#40;nTh&#41; &#123;
	var count = getPdMarkerCount&#40;this&#41;;
	for &#40;var i = 0; i < count; i++&#41;
		if &#40;isPdMarker&#40;this.pdMarkers&#91;i&#93;&#41;&#41;
		&#123;
			nTh--;
			if &#40;nTh == 0&#41;
			&#123;
				this.cursor = i;
				return this.pdMarkers&#91;i&#93;;
			&#125;
		&#125;
	return null;
&#125;

GMap2.prototype.getMarkerCount = function&#40;&#41; &#123;
	return getPdMarkerCount&#40;this&#41;;
&#125;

GMap2.prototype.boxMap = function&#40;center, span&#41; &#123;
	var spec = this.spec;
	var zoom = spec.getLowestZoomLevel&#40;center, span, this.viewSize&#41;;
	this.centerAndZoom&#40;new GPoint&#40;center.x, center.y&#41;, zoom&#41;;
&#125;

GMap2.prototype.zoomToMarkers = function&#40;slopPercentage, heightOffsetPct&#41; &#123;
	var count = 0;
	var thePoint, x, y, minX, maxX, minY, maxY, span;
	var marker = this.getFirstMarker&#40;&#41;;
	while &#40;marker != null&#41;
	&#123;
		if &#40;!marker.isHidden&#40;&#41;&#41;
		&#123;
			thePoint = marker.getPoint&#40;&#41;;
			// x = thePoint.x; y = thePoint.y;
			x = thePoint.lat&#40;&#41;; y = thePoint.lng&#40;&#41;;
			if &#40;count == 0&#41;
			&#123;
				minX = x; maxX = x; minY = y; maxY = y;
			&#125;
			else
			&#123;
				if &#40;x < minX&#41; minX = x;
				if &#40;x > maxX&#41; maxX = x;
				if &#40;y < minY&#41; minY = y;
				if &#40;y > maxY&#41; maxY = y;
			&#125;
			count++;
		&#125;
		marker = this.getNextMarker&#40;&#41;;
	&#125;
	if &#40;count == 1&#41;
		this.setCenter&#40;new GLatLng&#40;x,y&#41;, this.getZoom&#40;&#41;&#41;;
	else if &#40;count > 1&#41;
	&#123;
		var center = new GLatLng&#40;&#40;minX + maxX&#41; / 2, &#40;minY + maxY&#41; / 2&#41;
		span = new GSize&#40;Math.abs&#40;maxX - minX&#41;, Math.abs&#40;maxY - minY&#41;&#41;;
		slopWid = 0;
		slopHgt = 0;
		if &#40;typeof slopPercentage != "undefined"&#41;
		&#123;
			slopWid = span.width * slopPercentage / 200;
			slopHgt = span.height * slopPercentage / 200;
			span.width  *= 1 + slopPercentage / 100;
			span.height *= 1 + slopPercentage / 100;
		&#125;
		deltaHgt = 0;
		if &#40;typeof heightOffsetPct != "undefined"&#41;
		&#123;
			deltaHgt = span.height * heightOffsetPct / 100;
			center = new GLatLng&#40;center.lat&#40;&#41; + deltaHgt, center.lng&#40;&#41;&#41;;
		&#125;
		// needs slop
		var bounds = new GLatLngBounds&#40;new GLatLng&#40;minX-slopHgt, minY-slopWid&#41;, new GLatLng&#40;maxX+slopHgt, maxY+slopWid&#41;&#41;; // sw, ne
		var zoom = this.getBoundsZoomLevel&#40;bounds&#41;;
		this.setCenter&#40;center, zoom&#41;;
	&#125;
&#125;

function shorten&#40;x&#41; &#123;
	var factor = 1000000
	return Math.round&#40;x * factor&#41; / factor;
&#125;

function poweredByClick&#40;map&#41; &#123;
	var center = map.getCenter&#40;&#41;;
	var span = map.getBounds&#40;&#41;.toSpan&#40;&#41;;
	var zoom = map.getZoom&#40;&#41;;
	var url = "http&#58;//maps.google.com/maps?ll=" + center.lat&#40;&#41; + "," + center.lng&#40;&#41; + "&spn=" + shorten&#40;span.lat&#40;&#41;&#41; + "," + shorten&#40;span.lng&#40;&#41;&#41; + "&z=" + zoom + "&key=" + APIkey;
	document.location = url;
&#125;

function poweredByMouseover&#40;map&#41; &#123;
	var marker = map.getFirstMarker&#40;&#41;;
	var bounds = map.getBounds&#40;&#41;;
	var visibleCount = 0;
	var totalCount = 0;
	while &#40;marker != null&#41; &#123;
		if &#40;!marker.isHidden&#40;&#41;&#41;
		&#123;
			var point = marker.getPoint&#40;&#41;;
			if &#40;bounds.contains&#40;point&#41;&#41;
				visibleCount++;
			totalCount = totalCount + 1;
		&#125;
		marker = map.getNextMarker&#40;&#41;;
	&#125;
	var title = map.poweredByTitle + " &#40;" + visibleCount + " markers of " + totalCount + " visible&#41;"
	map.poweredByObj.setAttribute&#40;"title",title&#41;;
	map.poweredByObj.setAttribute&#40;"alt",title&#41;;
&#125;

function getPoweredBy&#40;map&#41; &#123;
	try &#123;
		var tooltip = "GMap " + getGoogleMapsVersion&#40;&#41; + " & PdMarker " + getPdMarkerShortVersion&#40;&#41;;
		map.poweredByTitle = tooltip;
		var b = document.createElement&#40;"img"&#41;;
		b.setAttribute&#40;"src","http&#58;//www.google.com/intl/en_ALL/mapfiles/transparent.gif"&#41;;
		b.setAttribute&#40;"width",62&#41;;
		b.setAttribute&#40;"alt",tooltip&#41;;
		b.setAttribute&#40;"title",tooltip&#41;;
		b.setAttribute&#40;"height",30&#41;;
		b.style.display = "block";
		b.style.position = "absolute";
		b.style.left    = "2px";
		b.style.bottom  = "0px";
		b.style.width   = "62px";
		b.style.height  = "30px";
		b.style.cursor  = "pointer";
		b.style.zIndex  = 600001;
		b.onclick = function&#40;&#41; &#123; poweredByClick&#40;map&#41;; &#125;;
		b.onmouseover = function&#40;&#41; &#123; poweredByMouseover&#40;map&#41;; &#125;;
	      map.getPane&#40;G_MAP_FLOAT_PANE&#41;.parentNode.parentNode.appendChild&#40;b&#41;;
		return b;
	&#125;
	catch &#40;e&#41; &#123;
	&#125;
	return true;
&#125;

function setPoweredBy&#40;map&#41; &#123;
	if &#40;!map.poweredByObj&#41; &#123;
		getGoogleMapsVersion&#40;&#41;; // possibly reduce IE memory leak, unchecked
		map.poweredByObj = getPoweredBy&#40;map&#41;;
	&#125;
&#125;


// PdMarker code


function PdMarkerNamespace&#40;&#41; &#123;

var userAgent = navigator.userAgent.toLowerCase&#40;&#41;;
var n4=&#40;document.layers&#41;;
var n6=&#40;document.getElementById&&!document.all&#41;;
var ie=&#40;document.all&#41;;
var o6=&#40;userAgent.indexOf&#40;"opera"&#41; != -1&#41;;
var safari=&#40;userAgent.indexOf&#40;"safari"&#41; != -1&#41;;
var msie  = &#40;userAgent.indexOf&#40;"msie"&#41; != -1&#41; && &#40;userAgent.indexOf&#40;"opera"&#41; == -1&#41;;
var msiePre7 = false;
if &#40;msie&#41;
	msiePre7 = userAgent.substr&#40;userAgent.indexOf&#40;"msie"&#41;+5,2&#41; < 7;   

var nextMarkerId = 10;
var permitLeft = true;

var icon = new GIcon&#40;&#41;;
icon.shadow = "http&#58;//www.google.com/mapfiles/shadow50.png";
icon.iconSize = new GSize&#40;20, 34&#41;;
icon.shadowSize = new GSize&#40;37, 34&#41;;
icon.iconAnchor = new GPoint&#40;9, 34&#41;;
icon.infoWindowAnchor = new GPoint&#40;9, 2&#41;;
icon.infoShadowAnchor = new GPoint&#40;18, 25&#41;;
icon.image = "http&#58;//www.google.com/mapfiles/marker.png";

// Globals - careful of multiple maps

function PdMarker&#40;a, b, tooltip&#41; &#123;
	this.inheritFrom = GMarker;
	if &#40;typeof b == "undefined"&#41; // pmj oct 23, 2005
		b = icon;
	this.inheritFrom&#40;a,b&#41;;
	if &#40;typeof tooltip != "undefined"&#41;
		this.pendingTitle = tooltip;
	else
		this.pendingTitle = "";
	if &#40;typeof b != "undefined"&#41;
		this.oldImagePath = b.image;
	else
		this.oldImagePath = "http&#58;//www.google.com/mapfiles/marker.png";
	this.internalId = nextMarkerId;
	nextMarkerId += 1;
	this.zIndexSaved = false;
	this.pendingCursor = "";
	this.percentOpacity = 70;
	this.mouseOutEnabled = true;
	this.setImageOn = true;
	this.hidingEnabled = true;
	this.showDetailOnClick = true;
	this.detailOpen = false;
	this.userData = "";
	this.displayed = true;
&#125;

// PdMarker.prototype = new GMarker;
PdMarker.prototype = new GMarker&#40;new GLatLng&#40;1, 1&#41;&#41;;


function addMarkerToMapList&#40;map,marker&#41; &#123;
	try &#123;
		if &#40;map.pdMarkers.length&#41; ;
	&#125;
	catch&#40;e&#41; &#123;
		map.pdMarkers = new Array&#40;&#41;;
	&#125;
	// add to list
	map.pdMarkers.push&#40;marker&#41;;
&#125;

function removeMarkerFromMapList&#40;map,marker&#41; &#123;
	var id = marker.internalId;
	for &#40;var i=0; i<map.pdMarkers.length; i++&#41;
		if &#40;map.pdMarkers&#91;i&#93;.internalId == id&#41;
		&#123;
			map.pdMarkers.splice&#40;i,1&#41;;
			return;
		&#125;
&#125;

PdMarker.prototype.initialize = function&#40;a&#41; &#123;
	if &#40;typeof a == "GMap"&#41;
	&#123;
		GLog.write&#40;"PdMarker requires GMap2"&#41;;
		return;
	&#125;
	addMarkerToMapList&#40;a,this&#41;;
	try
	&#123;
		GMarker.prototype.initialize.call&#40;this, a&#41;;
		this.isMarker = true;
		if &#40;this.pendingTitle.length > 0&#41;
			this.setTitle&#40;this.pendingTitle&#41;;
		if &#40;this.pendingCursor.length > 0&#41;
			this.setCursor&#40;this.pendingCursor&#41;;

		this.map = a;
		setPoweredBy&#40;a&#41;;

		GEvent.bindDom&#40;this, "mouseover", this, this.onMouseOver&#41;;
		GEvent.bindDom&#40;this, "mouseout",  this, this.onMouseOut&#41;;
		GEvent.bindDom&#40;this, "click",  this, this.onClick&#41;;
		GEvent.bind&#40;this.map, "zoomend", this, this.reZoom&#41;;
	&#125;
	catch&#40;e&#41; &#123;
		alert&#40;"PdMarker initialize error&#58; " + e&#41;;
	&#125;
&#125;

PdMarker.prototype.allowLeftTooltips = function&#40;a&#41;&#123;
	permitLeft = a;
&#125;

PdMarker.prototype.reZoom = function&#40;&#41;&#123;
	var didSet = false;
	if &#40;this.tooltipObject&#41;
		if &#40;this.tooltipObject.style.display == "block"&#41;
		&#123;
			setTTPosition&#40;this&#41;;
			didSet = true;
		&#125;
	if &#40;this.detailObject&#41;
	&#123;
		if &#40;!didSet&#41;
			setTTPosition&#40;this&#41;;
		setDetailPosition&#40;this&#41;;
	&#125;
&#125;

PdMarker.prototype.setId = function&#40;id&#41; &#123;
	this.internalId = id;
&#125;

PdMarker.prototype.getId = function&#40;&#41; &#123;
	return this.internalId;
&#125;

PdMarker.prototype.setName = function&#40;a&#41; &#123;
	this.name = a;
&#125;

PdMarker.prototype.getName = function&#40;&#41; &#123;
	if &#40;this.name&#41;
		return this.name;
	else
		return null;
&#125;

PdMarker.prototype.setUserData = function&#40;a&#41; &#123;
	this.userData = a;
&#125;

PdMarker.prototype.getUserData = function&#40;&#41; &#123;
	if &#40;this.userData&#41;
		return this.userData;
	else
//		return null;
		return "";
&#125;

PdMarker.prototype.setUserData2 = function&#40;a&#41; &#123;
	this.userData2 = a;
&#125;

PdMarker.prototype.getUserData2 = function&#40;&#41; &#123;
	if &#40;this.userData2&#41;
		return this.userData2;
	else
		return "";
&#125;

PdMarker.prototype.setImageEnabled = function&#40;a&#41; &#123;
	this.setImageOn = a;
&#125;

var PdMIN = "";
var PdMIA = "";

function PdCompPdMIN&#40;marker&#41; &#123;
	if &#40;PdMIN.length == 0&#41;
		for &#40;var i in marker&#41;
			if &#40;eval&#40;"typeof marker." + i&#41; == "object"&#41;
				try &#123;
					if &#40;eval&#40;"typeof marker." + i + "&#91;0&#93;.src"&#41; != "undefined"&#41;
					&#123;
						PdMIA = "this." + i;
						PdMIN = PdMIA + "&#91;0&#93;";
					&#125;
				&#125;
				catch &#40;e&#41; &#123;&#125;
&#125;

PdMarker.prototype.setImageOld = function&#40;a&#41; &#123;
	// 		GMarker.prototype.initialize.call&#40;this, a&#41;;
	var msFilter = 'progid&#58;DXImageTransform.Microsoft.AlphaImageLoader&#40;src="' + a + '"&#41;';
	if &#40;this.mouseOutEnabled && this.setImageOn&#41;
	&#123;
		PdCompPdMIN&#40;this&#41;;
		try &#123;
			if &#40;this.oldImagePath.length == 0&#41;
				eval&#40;"this.oldImagePath = " + PdMIN + ".src"&#41;;
			if &#40;msie && msiePre7&#41;
				eval&#40;PdMIN + ".style.filter = msFilter"&#41;;
			else
				eval&#40;PdMIN + ".src = a"&#41;;
		&#125;
		catch &#40;e&#41; &#123;&#125;
	&#125;
&#125;

PdMarker.prototype.setImage = function&#40;a&#41; &#123;
	if &#40;this.mouseOutEnabled && this.setImageOn&#41;
		GMarker.prototype.setImage.call&#40;this, a&#41;;
&#125;

PdMarker.prototype.restoreImage = function&#40;&#41; &#123;
	if &#40;this.mouseOutEnabled && this.setImageOn && this.oldImagePath.length > 0&#41;
		this.setImage&#40;this.oldImagePath&#41;;
&#125;

PdMarker.prototype.display = function&#40;a&#41; &#123;
	if &#40;a&#41;
		this.show&#40;&#41;;
	else
		this.hide&#40;&#41;;
&#125;

PdMarker.prototype.blink = function&#40;a,b&#41; &#123;
	if &#40;a&#41;
	&#123;
		this.blinkOn = true;
		this.blinkSpeed = b;
		if &#40;!this.blinking&#41;
		&#123;
			this.blinking = a;
			PdMarkerAddToExtList&#40;this&#41;;
			PdMarkerBlinkOnOff&#40;this.getId&#40;&#41;&#41;;
		&#125;
	&#125;
	else
	&#123;
		this.blinking = a;
		this.display&#40;true&#41;;
		PdMarkerRemoveFromExtList&#40;this&#41;;
	&#125;
&#125;

PdMarker.prototype.setIcon = function&#40;a&#41; &#123;
	this.remove&#40;&#41;;
	this.icon = a;
	this.initialize&#40;this.map&#41;;
	this.redraw&#40;true&#41;; 
&#125;

PdMarker.prototype.setMarkerZIndex = function&#40;a&#41; &#123;
	PdCompPdMIN&#40;this&#41;;
	if &#40;!this.zIndexSaved&#41;
	&#123;
		this.zIndexSaved = true;
		this.oldZIndex = eval&#40;PdMIN + ".style.zIndex"&#41;;
	&#125;
	eval&#40;PdMIN + ".style.zIndex = a"&#41;
	this.redraw&#40;true&#41;;
&#125;

PdMarker.prototype.topMarkerZIndex = function&#40;&#41; &#123;
	this.setMarkerZIndex &#40;600000&#41;;
&#125;

PdMarker.prototype.restoreMarkerZIndex = function&#40;&#41; &#123;
	PdCompPdMIN&#40;this&#41;;
	if &#40;this.zIndexSaved&#41;
	&#123;
		this.zIndexSaved = false;
		eval&#40;PdMIN + ".style.zIndex = this.oldZIndex"&#41;
		this.redraw&#40;true&#41;;
	&#125;
&#125;

PdMarker.prototype.onInfoWindowOpen = function&#40;&#41; &#123;
	this.hideTooltip&#40;&#41;;
	GMarker.prototype.onInfoWindowOpen.call&#40;this&#41;;
&#125;

PdMarker.prototype.setHoverImage = function&#40;a&#41; &#123;
	this.hoverImage = a;
&#125;

var inMouseOver = false;

PdMarker.prototype.onMouseOver = function&#40;&#41; &#123;
	if &#40;inMouseOver&#41;
		return;
	inMouseOver = true;
	if &#40;this.hoverImage&#41;
		this.setImage&#40;this.hoverImage&#41;;
	if &#40;!this.detailOpen&#41;
		this.showTooltip&#40;&#41;;
	inMouseOver = false;
&#125;

PdMarker.prototype.onMouseOut = function&#40;&#41; &#123;
	if &#40;this.hoverImage&#41;
		this.restoreImage&#40;&#41;;
	if &#40;!this.detailOpen&#41;
		if &#40;this.mouseOutEnabled&#41;
			this.hideTooltip&#40;&#41;;
&#125;

PdMarker.prototype.setMouseOutEnabled = function&#40;a&#41; &#123;
	this.mouseOutEnabled = a;
&#125;

PdMarker.prototype.getMouseOutEnabled = function&#40;&#41; &#123;
	return this.mouseOutEnabled;
&#125;

PdMarker.prototype.setTooltipHiding = function&#40;a&#41; &#123;
	this.hidingEnabled = a;
&#125;

PdMarker.prototype.getTooltipHiding = function&#40;&#41; &#123;
	return this.hidingEnabled;
&#125;

PdMarker.prototype.setTitle = function&#40;a&#41; &#123;
	this.tooltipText = "";
	PdCompPdMIN&#40;this&#41;;
	try &#123;
		eval&#40;PdMIN + ".title = a"&#41;;
	&#125;
	catch &#40;e&#41; &#123;
		this.pendingTitle = a;
	&#125;
&#125;

PdMarker.prototype.setCursor = function&#40;a&#41; &#123;
	PdCompPdMIN&#40;this&#41;;
	try &#123;
		eval&#40;PdMIN + ".style.cursor = a"&#41;;
	&#125;
	catch &#40;e&#41; &#123;
		this.pendingCursor = a;
	&#125;
&#125;

PdMarker.prototype.setTooltipClass = function&#40;a&#41; &#123;
	this.pendingClassName = a;
	if &#40;this.tooltipObject&#41;
	&#123;
		var showing = &#40;this.tooltipObject.style.display != "none"&#41;;
		this.deleteObjects&#40;&#41;;
		if &#40;this.tooltipRaw&#41;
			this.setTooltipNoResize&#40;this.tooltipRaw&#41;;
		if &#40;showing&#41;
			this.showTooltip&#40;&#41;;

	&#125;
	else
		if &#40;this.tooltipRaw&#41;
			this.setTooltipNoResize&#40;this.tooltipRaw&#41;;
&#125;

PdMarker.prototype.resetTooltipClass = function&#40;&#41; &#123;
	this.setTooltipClass&#40;"markerTooltip"&#41;;
&#125;

PdMarker.prototype.getTooltip = function&#40;&#41; &#123;
	try &#123;
		return this.tooltipRaw;
	&#125;
	catch &#40;e&#41;
	&#123;
		return "";
	&#125;
&#125;

PdMarker.prototype.setTooltipNoResize = function&#40;a&#41; &#123;
	this.setTitle&#40;""&#41;;
	var ttClass = "markerTooltip";
	if &#40;this.pendingClassName&#41;
		ttClass = this.pendingClassName;
	this.tooltipRaw = a;
	this.tooltipText = "<div class='" + ttClass + "'>" + a + "</div>";
	if &#40;this.tooltipObject&#41;
		this.tooltipObject.innerHTML = this.tooltipText;
&#125;

PdMarker.prototype.setTooltip = function&#40;a&#41; &#123;
	this.setTooltipNoResize&#40;a&#41;;
	this.deleteObjects&#40;&#41;;
&#125;

PdMarker.prototype.showTooltip = function&#40;&#41; &#123;
	if &#40;this.tooltipText&#41;
	&#123;
		if &#40;!this.tooltipObject&#41;
			initTooltip&#40;this&#41;;
		setTTPosition&#40;this&#41;;
		this.tooltipObject.style.display = "block";
	&#125;
&#125;

PdMarker.prototype.hideTooltip = function&#40;&#41; &#123;
	if &#40;this.tooltipObject&#41;
		if &#40;this.hidingEnabled&#41;
			this.tooltipObject.style.display = "none";
&#125;

PdMarker.prototype.onClick = function&#40;a&#41; &#123;
	if &#40;this.showDetailOnClick && this.detailWinHTML&#41;
		this.showDetailWin&#40;&#41;;
&#125;

PdMarker.prototype.setShowDetailOnClick = function&#40;a&#41; &#123;
	this.showDetailOnClick = a;
&#125;

PdMarker.prototype.setDetailWinHTML = function&#40;a&#41; &#123;
	this.detailWinHTML = a;
&#125;




PdMarker.prototype.setDetailWinClass = function&#40;a&#41; &#123;
	this.pendingDetailClassName = a;
&#125;

PdMarker.prototype.resetDetailWinClass = function&#40;&#41; &#123;
	this.setDetailWinClass&#40;"markerDetail"&#41;;
&#125;



PdMarker.prototype.showDetailWin = function&#40;&#41; &#123;
	if &#40;this.detailOpen&#41;
	&#123;
		this.closeDetailWin&#40;&#41;;
		return;
	&#125;
	this.hideTooltip&#40;&#41;;
	this.setMouseOutEnabled&#40;false&#41;;

	var winClass = "markerDetail";
	if &#40;this.pendingWinClassName&#41;
		winClass = this.pendingWinClassName;

	var html = "<table><tr><td>" + this.detailWinHTML + "<\/td><td valign='top'><a class='markerDetailClose' href='javascript&#58;PdMarkerClose&#40;" + this.internalId + "&#41;'><img src='http&#58;//www.google.com/mapfiles/close.gif' width='14' height='13'><\/a><\/td><\/tr><\/table>";
	html = "<div class='" + winClass + "'>" + html + "</div>";
	this.detailOpen = true;
	if &#40;!this.tooltipText&#41;
	&#123;
		this.ttWidth = 150;
		this.ttHeight = 30;
		setTTPosition&#40;this&#41;; // compute ttTop, ttLeft
	&#125;
	initDetailWin&#40;this, this.ttTop, this.ttLeft, html&#41;;
	PdMarkerAddToExtList&#40;this&#41;;
&#125;


PdMarker.prototype.closeDetailWin = function&#40;&#41; &#123;
	this.detailOpen = false;
	if &#40;this.detailObject&#41;
	&#123;
		this.setMouseOutEnabled&#40;true&#41;;
		this.onMouseOut&#40;&#41;;
		// GEvent.trigger&#40;this, "mouseout"&#41;;
	      this.map.getPane&#40;G_MAP_FLOAT_PANE&#41;.removeChild&#40;this.detailObject&#41;;
		this.detailObject = null;
	&#125;
&#125;

PdMarker.prototype.deleteObjects = function&#40;&#41; &#123;
	if &#40;this.tooltipObject&#41;
	&#123;
	      this.map.getPane&#40;G_MAP_FLOAT_PANE&#41;.removeChild&#40;this.tooltipObject&#41;;
		this.tooltipObject = null;
	&#125;
	if &#40;this.detailObject&#41;
	&#123;
		this.map.getPane&#40;G_MAP_FLOAT_PANE&#41;.removeChild&#40;this.detailObject&#41;;
		this.detailObject = null;
	&#125;
&#125;

PdMarker.prototype.remove = function&#40;a&#41; &#123;
	removeMarkerFromMapList&#40;this.map, this&#41;;
	PdMarkerRemoveFromExtList&#40;this.getId&#40;&#41;&#41;;
	GMarker.prototype.remove.call&#40;this&#41;;
	this.deleteObjects&#40;&#41;;
&#125;

PdMarker.prototype.setOpacity = function&#40;b&#41; &#123;
	if &#40;b < 0&#41;
		b=0;
	if &#40;b >= 100&#41;
		b=100;
	var c = b / 100;
	this.percentOpacity = b;
	var d = document.getElementById&#40;this.objId&#41;;
	if &#40;d&#41;
	&#123;
		if&#40;typeof&#40;d.style.filter&#41;=='string'&#41;&#123;d.style.filter='alpha&#40;opacity&#58;'+b+'&#41;';&#125;
		if&#40;typeof&#40;d.style.KHTMLOpacity&#41;=='string'&#41;&#123;d.style.KHTMLOpacity=c;&#125;
		if&#40;typeof&#40;d.style.MozOpacity&#41;=='string'&#41;&#123;d.style.MozOpacity=c;&#125;
		if&#40;typeof&#40;d.style.opacity&#41;=='string'&#41;&#123;d.style.opacity=c;&#125;
	&#125;
&#125;

PdMarker.prototype.setOpacityNew = function&#40;b&#41; &#123;
	setObjOpacity&#40;this.objId&#41;;
	this.percentOpacity = b;
&#125;

// ***** Private routines *****

function setObjOpacity&#40;objId, b&#41; &#123;
	if &#40;b < 0&#41;
		b=0;
	if &#40;b >= 100&#41;
		b=100;
	var c = b / 100;
	var d = document.getElementById&#40;objId&#41;;
	if &#40;d&#41;
	&#123;
		if&#40;typeof&#40;d.style.filter&#41;=='string'&#41;&#123;d.style.filter='alpha&#40;opacity&#58;'+b+'&#41;';&#125;
		if&#40;typeof&#40;d.style.KHTMLOpacity&#41;=='string'&#41;&#123;d.style.KHTMLOpacity=c;&#125;
		if&#40;typeof&#40;d.style.MozOpacity&#41;=='string'&#41;&#123;d.style.MozOpacity=c;&#125;
		if&#40;typeof&#40;d.style.opacity&#41;=='string'&#41;&#123;d.style.opacity=c;&#125;
	&#125;
&#125;

function idToElemId&#40;id&#41; &#123;
	return "ttobj" + id;
&#125;

function initTooltip&#40;theObj&#41; &#123;
	theObj.objId = idToElemId&#40;theObj.internalId&#41;;
	theObj.anchorLatLng = theObj.point;

	var b = document.createElement&#40;'span'&#41;;
	theObj.tooltipObject = b;
	b.setAttribute&#40;'id',theObj.objId&#41;;
	b.innerHTML = theObj.tooltipText;

	// append to body for size calculations
	var c = document.body;
	var d = document.getElementById&#40;"pdmarkerwork"&#41;;
	if &#40;d&#41;
		c = d;
	c.appendChild&#40;b&#41;;
	b.style.position = "absolute";
	b.style.bottom = "5px";
	b.style.left = "5px";
	b.style.zIndex = 1;
	if &#40;theObj.percentOpacity&#41;
		theObj.setOpacity&#40;theObj.percentOpacity&#41;;
	var tempObj = document.getElementById&#40;theObj.objId&#41;;
	theObj.ttWidth  = tempObj.offsetWidth;
	theObj.ttHeight = tempObj.offsetHeight;
	c.removeChild&#40;b&#41;;

	b.style.zIndex = 600000;
	b.style.bottom = "";
	b.style.left = "";
	theObj.map.getPane&#40;G_MAP_FLOAT_PANE&#41;.appendChild&#40;b&#41;;
&#125;

function initDetailWin&#40;theObj, top, left, html&#41; &#123;
	theObj.detailId = "detail" + theObj.internalId;
	var b = document.createElement&#40;'span'&#41;;
	theObj.detailObject = b;
	b.setAttribute&#40;'id',theObj.detailId&#41;;
	b.innerHTML = html;
	b.style.display = "block";
	b.style.position = "absolute";
	b.style.top  = top + "px";
	if &#40;theObj.rightSide&#41;
		b.style.left = left + "px";
	else
		b.style.right = -left + "px";
	b.style.zIndex = 600001;
	theObj.map.getPane&#40;G_MAP_FLOAT_PANE&#41;.appendChild&#40;b&#41;;
&#125;

function setTTPosition&#40;theObj&#41; &#123;
	var gap = 5;
	var map = theObj.map;
	var pt  = theObj.getPoint&#40;&#41;;
	var ttPos = latLongToPixel&#40;map, pt, map.getZoom&#40;&#41;&#41;;
	var theIcon = theObj.getIcon&#40;&#41;;
	
	ttPos.y -= Math.floor&#40;theIcon.iconAnchor.y/2&#41;;

	var rightSide = true;
	var bounds = map.getBounds&#40;&#41;;
	var boundsSpan	= bounds.toSpan&#40;&#41;;
	var longSpan = boundsSpan.lng&#40;&#41;;
	var mapWidth = map.getSize&#40;&#41;.width;

	var tooltipWidthInDeg = &#40;theObj.ttWidth + theIcon.iconSize.width + 6&#41; / mapWidth * longSpan;
	if &#40;pt.lng&#40;&#41; + tooltipWidthInDeg > bounds.getNorthEast&#40;&#41;.lng&#40;&#41; && permitLeft&#41;
		rightSide = false;
	ttPos.y -= Math.floor&#40;theObj.ttHeight/2&#41;;
	delta = &#40;theIcon.iconSize.width - theIcon.iconAnchor.x&#41; + gap;
	if &#40;rightSide&#41;
		ttPos.x += delta;
	else
		ttPos.x -= delta
	theObj.rightSide = rightSide;
	theObj.ttLeft = ttPos.x;
	theObj.ttTop  = ttPos.y;
	if &#40;theObj.tooltipObject&#41;
	&#123;
		if &#40;rightSide&#41; &#123;
			theObj.tooltipObject.style.left = ttPos.x + "px";
			theObj.tooltipObject.style.right = null;
		&#125;
		else &#123;
			theObj.tooltipObject.style.left = null;
			theObj.tooltipObject.style.right = -ttPos.x + "px";
		&#125;
		theObj.tooltipObject.style.top  = ttPos.y + "px";
	&#125;
&#125;

function makeInterface&#40;a&#41; &#123;
	var b = a || window;
	b.PdMarker = PdMarker;
&#125;

makeInterface&#40;&#41;;
&#125;


PdMarkerNamespace&#40;&#41;;

Vale sthn selida sou ton parakato kodika:

Κώδικας: Επιλογή όλων

    <style type="text/css">
       div.markerTooltip, div.markerDetail &#123;
          color&#58; black;
          background-color&#58; #e8f5fe;

          margin&#58; 0;
          padding&#58; 2px 4px;
          border&#58; 1px solid #007af4;
width&#58;150px;

       &#125;
.iwstyle&#123;
  font-size &#58; 12px;
  font-family &#58; Verdana;
  font-weight &#58; bold;
  color &#58; #0061c1;

&#125;
.iwstylea&#123;
  font-size &#58; 11px;
  font-family &#58; Verdana;
  font-weight &#58; normal;
  color &#58; navy;

&#125;
    </style>

    <script src="http&#58;//maps.google.com/maps?file=api&amp;v=2&amp;key=API-KEY"
            type="text/javascript"></script>
<script type="text/javascript" src="http&#58;//TOSITESOU/gmaps.js"></script>
<script type="text/javascript">
//<!&#91;CDATA&#91;
window.onload = onPageLoad;
var map;

function onPageLoad&#40;&#41; &#123;
    if &#40;GBrowserIsCompatible&#40;&#41;&#41; &#123;
	map = new GMap2&#40;document.getElementById&#40;"map"&#41;&#41;;
	map.setCenter&#40;new GLatLng&#40;40.611598, 22.985572&#41;, 9&#41;;
	map.addControl&#40;new GLargeMapControl&#40;&#41;&#41;;
	marker = new PdMarker&#40;new GLatLng&#40;40.611598,22.985572&#41;&#41;;
	marker.setTooltip&#40;"<span class='iwstyle'>EPONYMIA</span>"&#41;;
	var html = "<span class='iwstyle'>EPONYMIA</span><br><span class='iwstylea'>DIEYTHYNSH ALLES PLHROFORIES</span>";
	marker.setDetailWinHTML&#40;html&#41;;
	marker.setHoverImage&#40;"http&#58;//www.google.com/mapfiles/dd-start.png"&#41;;
	map.addOverlay&#40;marker&#41;;

    &#125;
&#125;
//&#93;&#93;>
</script>

Allakse ta API-KEY, TOSITESOU, EPONYMIA, DIEYTHYNSH ALLES PLHROFORIES me ta dika sou dedomena.... sto marker = new PdMarker(new GLatLng(40.611598,22.985572)); vazeis tis syntetagmenes pou thes na emfanizetai o marker..


Vazeis to parakato ekei pou thes na emfanizetai o xarths:

Κώδικας: Επιλογή όλων

    <div id="map" style="width&#58; 425px; height&#58; 350px"></div>
    <div id="pdmarkerwork"></div>

Eisai etoimos.. paikse me to style gia na doseis thn dikh sou emfanish sto tooltip..


Demo edo: http://www.istopoli.com/cruise/sal.html
Οι πάνες και οι πολιτικοί πρέπει να αλλάζονται συχνά για τον ίδιο λόγο...

Άβαταρ μέλους
fiskilis
Honorary Member
Δημοσιεύσεις: 14095
Εγγραφή: 16 Νοέμ 2003 22:44
Τοποθεσία: Athens
Επικοινωνία:

Google maps σε site

Δημοσίευση από fiskilis » 30 Απρ 2009 20:53

EneMe έγραψε:Σε joomla πώς μπαίνει;

Ως κώδικας σε άρθρο δηλαδή...

Γιατί δεν πιστεύω να πρέπει να φορτώνεται το script μέσα από το template σε κάθε σελίδα τσάμπα...
κανεις την σελιδα απο το μενου σε περιβλημα και εκει βαζεις το λινκ και οχι τον κωδικα και ειναι το ιδιο !

Άβαταρ μέλους
EneMe
Super Moderator
Δημοσιεύσεις: 13308
Εγγραφή: 09 Ιούλ 2002 13:29
Τοποθεσία: Στο κέντρο της Ελλάδας!
Επικοινωνία:

Google maps σε site

Δημοσίευση από EneMe » 30 Απρ 2009 21:10

fiskilis έγραψε:
EneMe έγραψε:Σε joomla πώς μπαίνει;

Ως κώδικας σε άρθρο δηλαδή...

Γιατί δεν πιστεύω να πρέπει να φορτώνεται το script μέσα από το template σε κάθε σελίδα τσάμπα...
κανεις την σελιδα απο το μενου σε περιβλημα και εκει βαζεις το λινκ και οχι τον κωδικα και ειναι το ιδιο !
Ti κάνω;
Δεν κατάλαβα...


Απάντηση

Επιστροφή στο “JavaScript και Frameworks”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 1 επισκέπτης