-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tagging releases 1.0 and 1.1 of PopupMarker
- Loading branch information
pamela.fox
committed
Aug 20, 2009
1 parent
f2c7aed
commit 940fc31
Showing
393 changed files
with
1,168 additions
and
48,028 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,305 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>PopupMarker v1.0 Reference</title> | ||
<link rel="stylesheet" type="text/css" href="http://code.google.com/css/codesite.css"></link> | ||
<link rel="stylesheet" type="text/css" href="../../util/docs/template/local_extensions.css"></link> | ||
</head> | ||
<body> | ||
<h1>PopupMarker</h1> | ||
<p> | ||
This library displays a "popup" (mini infowindow) to the side of a marker. | ||
There are two types of popups that this library can create for you. | ||
The first is a simple popup that can render text or HTML, but its | ||
background color cheme cannot be changed. | ||
The second type of popup is generated using the | ||
<a href="http://groups.google.com/group/google-chart-api/web/chart-types-for | ||
-information-bubbles">Google Charts API</a>, | ||
and can show text and icons, with any desired color scheme. | ||
Since the second popup effectively re-generates an image anytime | ||
its options are changed, it's not recommended for use in situations | ||
where you want to animate the content of the popup at a fast rate. | ||
The popup types are chosen based on the value of "type" in the options.</p> | ||
<p>For a description and examples of how to use this library, check out the <a href="examples.html">how-to</a>.</p> | ||
|
||
<h2><a name="PopupMarker"></a>class PopupMarker</h2> | ||
<p></p> | ||
|
||
<h3>Constructor</h3> | ||
<table summary="class PopupMarker - Constructor" width="90%"> | ||
|
||
<tbody> | ||
<tr> | ||
<th>Constructor</th> | ||
|
||
<th>Description</th> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>PopupMarker(<span class="type">latlng:GLatLng</span>, <span class="type">opts?:PopupMarkerOptions</span>)</code></td> | ||
|
||
<td>Creates a marker with options specified in <code><a href="reference.html#PopupMarkerOptions">PopupMarkerOptions</a></code> | ||
(extension of <code>GMarkerOptions</code>). Creates a popup and then | ||
calls the <code>GMarker</code> constructor.</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
<h3>Methods</h3> | ||
<table summary="class PopupMarker - Methods" width="90%"> | ||
|
||
<tbody> | ||
<tr> | ||
<th>Methods</th> | ||
|
||
|
||
<th>Return Value</th> | ||
|
||
|
||
<th>Description</th> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>hide()</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Hides the marker and popup.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>hidePopup()</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Hides the popup.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>setChartBgColor(<span class="type">bgColor:String</span>)</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Sets the background color. | ||
If the <code>style</code> property not set to "chart", | ||
then this property is ignored.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>setChartIcon(<span class="type">iconName:String</span>)</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Sets the icon name. | ||
If the <code>style</code> property not set to "chart", | ||
then this property is ignored.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>setChartStyle(<span class="type">styleName:String</span>)</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Sets the chart style. | ||
If the <code>style</code> property not set to "chart", | ||
then this property is ignored.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>setChartTextColor(<span class="type">textColor:String</span>)</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Sets the text color. | ||
If the <code>style</code> property not set to "chart", | ||
then this property is ignored.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>setText(<span class="type">message:Strings</span>)</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Set the text of the popup message.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>show()</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Shows the marker. | ||
Note that this method shows only the marker. | ||
If you want to show marker and the popup, | ||
then use the <code>showPopup</code>.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>showPopup()</code></td> | ||
|
||
|
||
<td><code>None</code></td> | ||
|
||
|
||
<td>Shows the marker and the popup.</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
<h2><a name="PopupMarkerChartAPIOptions"></a>class PopupMarkerChartAPIOptions</h2> | ||
<p>This class represents options passed to the <code>chart</code> property | ||
in <code><a href="reference.html#PopupMarkerOptions">PopupMarkerOptions</a></code>. It has no constructor, but is instantiated as | ||
an object literal. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.</p> | ||
|
||
<h3>Properties</h3> | ||
<table summary="class PopupMarkerChartAPIOptions - Properties" width="90%"> | ||
|
||
<tbody> | ||
<tr> | ||
<th>Properties</th> | ||
|
||
|
||
<th>Type</th> | ||
|
||
|
||
<th>Description</th> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>bgColor</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies background color | ||
as a 6-digit hexadecimal number. The default value is <code> "FFFFFF"</code>.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>chartStyle</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies layout/size. Valid options are | ||
"d_bubble_icon_text_small", "d_bubble_icon_text_big", | ||
"d_bubble_icon_texts_big", and "d_bubble_texts_big". Those options are shown | ||
<a href="http://groups.google.com/group/google-chart-api/web/chart-types-for-information-bubbles">here</a>. The default value is <code> ""</code>.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>icon</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies an icon name. Valid options are shown | ||
<a href="http://groups.google.com/group/google-chart-api/web/chart-types-for-information-bubbles#large_icons">here</a>. The default value is <code> ""</code>.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>textColor</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies text color | ||
as a 6-digit hexadecimal number. The default value is <code> "000000"</code>.</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
<h2><a name="PopupMarkerOptions"></a>class PopupMarkerOptions</h2> | ||
<p>This class represents optional arguments to <code><a href="reference.html#PopupMarker">PopupMarker</a></code> and | ||
<code>GMarker</code>. | ||
It has no constructor, but is instantiated as an object literal. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.</p> | ||
|
||
<h3>Properties</h3> | ||
<table summary="class PopupMarkerOptions - Properties" width="90%"> | ||
|
||
<tbody> | ||
<tr> | ||
<th>Properties</th> | ||
|
||
|
||
<th>Type</th> | ||
|
||
|
||
<th>Description</th> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>chart</code></td> | ||
|
||
|
||
<td><code>PopupMarkerChartAPIOptions</code></td> | ||
|
||
|
||
<td>This property specifies | ||
various customization options for the Charts API output. | ||
If the <code>style</code> property is not set to "chart", then this property is | ||
ignored. The default value is <code> {}</code>.</td> | ||
</tr> | ||
|
||
<tr class="even"> | ||
<td><code>style</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies style of popup. | ||
If set to "chart", then this library shows the popup using the | ||
output of the Google Chart API, and additional options should be specified | ||
in the <code>chart</code> property. The default value is <code> "normal"</code>.</td> | ||
</tr> | ||
|
||
<tr class="odd"> | ||
<td><code>text</code></td> | ||
|
||
|
||
<td><code>String</code></td> | ||
|
||
|
||
<td>Specifies the text shown in the popup. | ||
If the <code>style</code> property is set to "chart", then this string must follow | ||
the format for text in the Google Charts API. The default value is <code> ""</code>.</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
|
||
|
||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
_uacct = "UA-964209-4"; | ||
urchinTracker(); | ||
</script> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | ||
<title>Google Maps JavaScript API Example: PopupMarker</title> | ||
<script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxQGj0PqsCtxKvarsoS-iqLdqZSKfxRdmoPmGl7Y9335WLC36wIGYa6o5Q" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
document.write('<script type="text/javascript" src="../src/popupmarker'+(document.location.search.indexOf('packed')>-1?'_packed':'')+'.js"><'+'/script>'); | ||
</script> | ||
<script type="text/javascript"> | ||
|
||
function initialize() { | ||
if (GBrowserIsCompatible()) { | ||
var map = new GMap2(document.getElementById("map_canvas")); | ||
map.setCenter(new GLatLng(37.4419, -122.1419), 1); | ||
|
||
var opt = {text:"<img src='images/japan.jpg' width='20' height='13'>Japan, Tokyo<br><br>Please drag me!", draggable:true}; | ||
var marker1 = createMaker(new GLatLng(35.681382, 139.766084), "Japan,Tokyo", opt); | ||
map.addOverlay(marker1); | ||
|
||
var opt = {text:"<img src='images/usa.jpg' width='20' height='13'>USA,NewYork", draggable:true}; | ||
var marker2 = new PopupMarker(new GLatLng(40.756054, -73.986951), opt); | ||
map.addOverlay(marker2); | ||
marker2.showPopup(); | ||
} | ||
} | ||
|
||
function createMaker(latlng, msg, opt){ | ||
var marker = new PopupMarker(latlng, opt); | ||
|
||
GEvent.addListener(marker,"click", function(){ | ||
marker.openInfoWindowHtml(msg); | ||
marker.hidePopup(); | ||
}); | ||
GEvent.addListener(marker,"dragstart", function(){ | ||
marker.hidePopup(); | ||
}); | ||
GEvent.addListener(marker,"dragend", function(){ | ||
marker.showPopup(marker.getLatLng()); | ||
}); | ||
GEvent.addListener(marker,"mouseover", function(){ | ||
marker.showPopup(); | ||
}); | ||
GEvent.addListener(marker,"mouseout", function(){ | ||
marker.hidePopup(); | ||
}); | ||
return marker; | ||
} | ||
</script> | ||
</head> | ||
<body onload="initialize()" onunload="GUnload()"> | ||
<div id="map_canvas" style="width: 600px; height: 500px"></div><br> | ||
Please drag the markers. | ||
</body> | ||
</html> | ||
|
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.