Google Groups Home
Help | Sign in
Group info
Members: 35778
Activity: High activity
Language: English
Group categories:
Science and Technology > Earth Sciences
Computers > Internet
More group info »
Recent pages and files
Examples Tutorials Gpolygon Gpolyline    

Official Class Reference:

http://www.google.com/apis/maps/documentation/reference.html#GPolygon

http://www.google.com/apis/maps/documentation/reference.html#GPolyline 

 


GPolygon Examples: 

 

Test whether a point is inside or outside a polygon (defining a .contains method on GPolygon)

http://econym.googlepages.com/inside.htm

 

See also:

http://www.mailbag.com/users/joe_/clkpoly.htm 


Comparing different techniques while detecting mouseclicks on polygon

HowTo speed up detecting mouseclicks on polygon using boundingboxes

http://freesync.ath.cx/maptest/poly_click.php

This sample is based on :

http://econym.googlepages.com/inside.htm

 

Create n-sided polygons, circles, or stars (using GPolygon):

http://maps.examples.googlepages.com/gpolygon.htm


Drawing neighborhood border shapes (hard-coded coordinates) and increasing the opacity of GPolygons on mouseover:

http://xmaps.busmonster.com/poly.html

 

Diagrams with GPolygon/GPolyline. Clock as an example of dynamic pie.

http://koti.mbnet.fi/ojalesa/exam/polytime.htm

 

Using GPolygon to highlight a marker with a circle underneath when clicking/mousing over/dragging:

http://maps.examples.googlepages.com/highlightmarker.html

 

Draggable/Resizable GPolygon Demo

http://www.alexegg.com/apps/debug/gpolygon

 


GPolyline Examples: 


Getting your polyline to work in IE (important!):

http://www.google.com/apis/maps/documentation/#XHTML_and_VML

 

Encoding a polyline with 3 points (links to polyline creating utility,  compression algorithm explanation): 

http://www.google.com/apis/maps/documentation/#Encoded_Polylines

 

Create and drag a circle radiating from a particular point (using GPolyline):

http://maps.huge.info/dragcircle2.htm

http://maps.huge.info/dragcircle.htm (simple version)

 

Reading GPolylines from an XML file:

http://econym.googlepages.com/basic7.htm 

 

Drawing GPolylines with arrowheads:

http://econym.googlepages.com/arrows.htm 

 

Simulating "scratched" letters on the map with GPolyline (defining custom shapes):
http://gmaps.examples.googlepages.com/gpolyletters.htm?message=WE%20%3C3%20GMAPS&lat=38.54816542304656&lng=-162.421875&zoom=3

Version: 
Latest 3 messages about this page (23 total) - view full discussion
Feb 11 2007 by Kromkowski
Example link for your custom overlay?
You do it from a center point? I thought height and width from which
foci and e can be determined?
Or we can borrow from here.
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
Feb 11 2007 by the1geek
Very cool Pam!
Just a thought - since oval highlights are widely used in cartography,
why not provide API support of GOval object utilizing vml:oval in IE
and svg:ellipse in FF. So instead of explicitly generating gpoints for
the circular polyline, we just provide the GLatLng center, width &
height, as well as the usual stroke width & color and fill color. I
Feb 9 2007 by pamela (Google Employee)
Sure- here's some PHP code. It should be approx. correct, it's a
simplified version of a more complex script.
Using PHP4.3 and the dom xml functionality (let me know if you don't
have access to those functions):
<?php
header("Content-type: text/xml");
// START XML FILE
$doc = domxml_new_doc("1.0");
$node = $doc->create_element("markers");
20 more messages »
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google