⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linestring.js

📁 用来在地图上做操作GIS,在地图上做标记
💻 JS
字号:
/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. * See http://svn.openlayers.org/trunk/openlayers/release-license.txt  * for the full text of the license. *//** * @requires OpenLayers/Geometry/Curve.js *  * Class: OpenLayers.Geometry.LineString * A LineString is a Curve which, once two points have been added to it, can  * never be less than two points long. *  * Inherits from: *  - <OpenLayers.Geometry.Curve> */OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, {    /**     * Constructor: OpenLayers.Geometry.LineString     * Create a new LineString geometry     *     * Parameters:     * points - {Array(<OpenLayers.Geometry.Point>)} An array of points used to     *          generate the linestring     *     */    initialize: function(points) {        OpenLayers.Geometry.Curve.prototype.initialize.apply(this, arguments);            },    /**     * APIMethod: removeComponent     * Only allows removal of a point if there are three or more points in      * the linestring. (otherwise the result would be just a single point)     *     * Parameters:      * point - {<OpenLayers.Geometry.Point>} The point to be removed     */    removeComponent: function(point) {        if ( this.components && (this.components.length > 2)) {            OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,                                                                   arguments);        }    },    CLASS_NAME: "OpenLayers.Geometry.LineString"});

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -