Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who helped out in making this happen. (I could list people, but the list would be long, and I'm already mentally on vacation.) git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,31 +4,45 @@
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer/Markers.js
|
||||
*
|
||||
* Class: OpenLayers.Layer.Text
|
||||
* Tab seperated values file parsing code which creates a markers layer.
|
||||
*
|
||||
* Inherits from;
|
||||
* - <OpenLayers.Layer.Markers>
|
||||
*/
|
||||
OpenLayers.Layer.Text = OpenLayers.Class.create();
|
||||
OpenLayers.Layer.Text.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Layer.Markers, {
|
||||
|
||||
/** store url of text file - this should be specified in the
|
||||
* "options" hashtable
|
||||
* @type str */
|
||||
/**
|
||||
* APIProperty: location
|
||||
* {String} store url of text file - this should be specified in the
|
||||
* "options" hashtable. Can not be changed once passed in.
|
||||
*/
|
||||
location:null,
|
||||
|
||||
/** @type Array(OpenLayers.Feature) */
|
||||
/**
|
||||
* Property: features
|
||||
* Array({<OpenLayers.Feature>})
|
||||
*/
|
||||
features: null,
|
||||
|
||||
/** @type OpenLayers.Feature */
|
||||
/**
|
||||
* Property: selectedFeature
|
||||
* {<OpenLayers.Feature>}
|
||||
*/
|
||||
selectedFeature: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {String} location
|
||||
* @param {Object} options Hashtable of extra options to tag onto the layer
|
||||
* Constructor: OpenLayers.Layer.Text
|
||||
* Create a text layer.
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* options - {Object} Hashtable of extra options to tag onto
|
||||
* the layer. Must include "location" property.
|
||||
*/
|
||||
initialize: function(name, options) {
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
|
||||
@@ -39,7 +53,7 @@ OpenLayers.Layer.Text.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* APIMethod: destroy
|
||||
*/
|
||||
destroy: function() {
|
||||
this.clearFeatures();
|
||||
@@ -49,7 +63,10 @@ OpenLayers.Layer.Text.prototype =
|
||||
|
||||
|
||||
/**
|
||||
* @param {XMLHttpRequest} ajaxRequest
|
||||
* Method: parseData
|
||||
*
|
||||
* Parameters:
|
||||
* ajaxRequest - {XMLHttpRequest}
|
||||
*/
|
||||
parseData: function(ajaxRequest) {
|
||||
var text = ajaxRequest.responseText;
|
||||
@@ -137,7 +154,10 @@ OpenLayers.Layer.Text.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
* Property: markerClick
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Event}
|
||||
*/
|
||||
markerClick: function(evt) {
|
||||
sameMarkerClicked = (this == this.layer.selectedFeature);
|
||||
@@ -152,7 +172,7 @@ OpenLayers.Layer.Text.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* Method: clearFeatures
|
||||
*/
|
||||
clearFeatures: function() {
|
||||
if (this.features != null) {
|
||||
|
||||
Reference in New Issue
Block a user