Replace all instances and usages of LatLon to LonLat

git-svn-id: http://svn.openlayers.org/trunk/openlayers@99 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-17 15:51:37 +00:00
parent 3d1b137009
commit 6f242f5746
12 changed files with 105 additions and 104 deletions

View File

@@ -1,38 +1,46 @@
OpenLayers.Marker = Class.create();
OpenLayers.Marker.prototype = {
// icon: {OpenLayers.Icon} for marker
/** @type OpenLayers.Icon */
icon: null,
// latlon: {OpenLayers.LatLon} location of object
latlon: null,
/** location of object
* @type OpenLayers.LonLat */
lonlat: null,
/** the data object associated with the marker
* @type Object */
data: null,
// events
/** @type */
events: null,
// map
/** @type OpenLayers.Map */
map: null,
initialize: function(icon, latlon) {
/**
* @param {OpenLayers.Icon} icon
* @param {OpenLayers.LonLat lonlat
*/
initialize: function(icon, lonlat) {
this.icon = icon;
this.latlon = latlon;
this.lonlat = lonlat;
},
/**
*/
draw: function() {
var resolution = this.map.getResolution();
var extent = this.map.getExtent();
if (this.latlon.lat > extent.minlat &&
this.latlon.lat < extent.maxlat &&
this.lonlon.lon > extent.minlon &&
this.lonlon.lon < extent.maxlon) {
if ( (this.lonlat.lat > extent.minlat)
&& (this.lonlat.lat < extent.maxlat)
&& (this.lonlat.lon > extent.minlon)
&& (this.lonlat.lon < extent.maxlon)) {
var pixel = new OpenLayers.Pixel(
resolution * (this.latlon.lon - extent.minlon),
resolution * (extent.maxlat - this.latlon.lat)
resolution * (this.lonlat.lon - extent.minlon),
resolution * (extent.maxlat - this.lonlat.lat)
);
// need to account for how much layer has moved...
/* Psuedocode: