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:

  1.  
  2. var plotter = new GPlotter();
  3. plotter.setColor(plotter.BLUE);
  4. plotter.setIconUrl(”http://gplotter.offwhite.net/maps/icons/”);
  5. plotter.plot(”map”, “labels”, “milwaukee.xml?version=0.9.0″);
  6.  

Extending GPlotter

JAVASCRIPT:

  1.  
  2. var MyMapper = Class.create();
  3. Object.extend(MyMapper.prototype, GPlotter.prototype);
  4. var mapper = new MyMapper();
  5. mapper.plot(”map”, “labels”, “milwaukee.xml”);
  6.  

Gplotter

Source: Ajaxian
Original Article: http://ajaxian.com/archives/gplotter-09-prototype-and-google-maps-v2-update

Leave a Reply

You must be logged in to post a comment.



Site Navigation