LineString.js 801 B

123456789101112131415161718192021222324252627
  1. define("dojox/geo/openlayers/LineString", ["dojo/_base/kernel", "dojo/_base/declare", "dojox/geo/openlayers/Geometry"], function(dojo, declare,
  2. /* =====
  3. var Geometry = dojox.geo.openlayers.Geometry;
  4. =====*/ Geometry){
  5. return declare("dojox.geo.openlayers.LineString", Geometry, {
  6. // summary:
  7. // The `dojox.geo.openlayers.LineString` geometry. This geometry holds an array
  8. // of coordinates.
  9. setPoints : function(p){
  10. // summary:
  11. // Sets the points for this geometry.
  12. // p : Array
  13. // An array of {x, y} objects
  14. this.coordinates = p;
  15. },
  16. getPoints : function(){
  17. // summary:
  18. // Gets the points of this geometry.
  19. // returns: Array
  20. // The points of this geometry.
  21. return this.coordinates;
  22. }
  23. });
  24. });