|
Revision 663, 0.7 kB
(checked in by sbenthall, 2 years ago)
|
|
Cleanup after Arnes foobup
|
| Line | |
|---|
| 1 | Vespucci.FeaturePermalink = |
|---|
| 2 | OpenLayers.Class(OpenLayers.Control.Permalink, { |
|---|
| 3 | |
|---|
| 4 | ARG_PARSER_CLASS_NAME: "Vespucci.SelectionArgParser", |
|---|
| 5 | |
|---|
| 6 | SELECT_ARGUMENT_KEY: "select", |
|---|
| 7 | |
|---|
| 8 | initialize: function(options) { |
|---|
| 9 | OpenLayers.Control.Permalink.prototype.initialize.apply(this, arguments); |
|---|
| 10 | }, |
|---|
| 11 | |
|---|
| 12 | createUrl: function(feature) { |
|---|
| 13 | var center = null; |
|---|
| 14 | |
|---|
| 15 | if (feature) { |
|---|
| 16 | center = feature.getLocation(); |
|---|
| 17 | } |
|---|
| 18 | |
|---|
| 19 | var url = OpenLayers.Control.Permalink.prototype.createUrl.apply(this, [center]); |
|---|
| 20 | |
|---|
| 21 | if (feature) { |
|---|
| 22 | url += "&" + this.SELECT_ARGUMENT_KEY + "=" + feature.getFID(); |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | return url; |
|---|
| 26 | }, |
|---|
| 27 | |
|---|
| 28 | CLASS_NAME: "Vespucci.FeaturePermalink" |
|---|
| 29 | }); |
|---|