GPlotter 0.9: Prototype and Google Maps v2 update
Written by on February 9th, 2007 in Ajax News.
Brennan Stehling has updated his GPlotter project “to make use of the revised Google Maps API. I also completely restructured the Javascript to a much more object oriented coding style. I am using the latest release of Prototype, which recently moved to a new location as well as posted a great deal of new documentation. I am using Prototype for the object inheritance and AJAX functionality.”
GPlotter Example
JAVASCRIPT:
-
-
var plotter = new GPlotter();
-
plotter.setColor(plotter.BLUE);
-
plotter.setIconUrl(”http://gplotter.offwhite.net/maps/icons/”);
-
plotter.plot(”map”, “labels”, “milwaukee.xml?version=0.9.0″);
-
Extending GPlotter
JAVASCRIPT:
-
-
var MyMapper = Class.create();
-
Object.extend(MyMapper.prototype, GPlotter.prototype);
-
var mapper = new MyMapper();
-
mapper.plot(”map”, “labels”, “milwaukee.xml”);
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/gplotter-09-prototype-and-google-maps-v2-update
