| | 217 | move: function(location) { |
|---|
| | 218 | |
|---|
| | 219 | var pixel; |
|---|
| | 220 | if (location.CLASS_NAME == "OpenLayers.LonLat") { |
|---|
| | 221 | pixel = this.layer.getViewPortPxFromLonLat(location); |
|---|
| | 222 | } else { |
|---|
| | 223 | pixel = location; |
|---|
| | 224 | } |
|---|
| | 225 | |
|---|
| | 226 | var lastPixel = this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()); |
|---|
| | 227 | var res = this.layer.map.getResolution(); |
|---|
| | 228 | this.geometry.move(res * (pixel.x - lastPixel.x), |
|---|
| | 229 | res * (lastPixel.y - pixel.y)); |
|---|
| | 230 | this.layer.drawFeature(this); |
|---|
| | 231 | return lastPixel; |
|---|
| | 232 | }, |
|---|
| | 233 | |
|---|