-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jd: [trunk/SharpLayers] adding a couple of files present in the tagge…
…d version but not the trunk. additional functionality for a Measure/MeasureTool.js, OSM layer and Yahoo Layer
- Loading branch information
Showing
13 changed files
with
269 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Osm/OsmLayerBuilderParams.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* The attached / following is part of SharpMap.Presentation.Web.SharpLayers | ||
* SharpMap.Presentation.Web.SharpLayers is free software © 2008 Newgrove Consultants Limited, | ||
* www.newgrove.com; you can redistribute it and/or modify it under the terms | ||
* of the current GNU Lesser General Public License (LGPL) as published by and | ||
* available from the Free Software Foundation, Inc., | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA: http://fsf.org/ | ||
* This program is distributed without any warranty; | ||
* without even the implied warranty of merchantability or fitness for purpose. | ||
* See the GNU Lesser General Public License for the full details. | ||
* | ||
* Author: John Diss 2010 | ||
* | ||
*/ | ||
using System.ComponentModel; | ||
using System.Web.UI; | ||
using AjaxControlToolkit; | ||
|
||
namespace SharpMap.Presentation.Web.SharpLayers.Layers.Osm | ||
{ | ||
public class OsmLayerBuilderParams : LayerBuilderParamsBase, IGridBasedLayerBuilderParams | ||
{ | ||
#region IGridBasedLayerBuilderParams Members | ||
|
||
[ExtenderControlProperty(true, true)] | ||
[ClientPropertyName("tileSize")] | ||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), | ||
PersistenceMode(PersistenceMode.InnerProperty)] | ||
public Size TileSize { get; set; } | ||
|
||
[ExtenderControlProperty] | ||
[ClientPropertyName("transitionEffect")] | ||
public TransitionEffects TransitionEffect { get; set; } | ||
|
||
[ExtenderControlProperty] | ||
[ClientPropertyName("buffer")] | ||
public int Buffer { get; set; } | ||
|
||
#endregion | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Osm/OsmLayerComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* The attached / following is part of SharpMap.Presentation.Web.SharpLayers | ||
* SharpMap.Presentation.Web.SharpLayers is free software © 2008 Newgrove Consultants Limited, | ||
* www.newgrove.com; you can redistribute it and/or modify it under the terms | ||
* of the current GNU Lesser General Public License (LGPL) as published by and | ||
* available from the Free Software Foundation, Inc., | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA: http://fsf.org/ | ||
* This program is distributed without any warranty; | ||
* without even the implied warranty of merchantability or fitness for purpose. | ||
* See the GNU Lesser General Public License for the full details. | ||
* | ||
* Author: John Diss 2010 | ||
* | ||
*/ | ||
|
||
using System.Web.UI; | ||
using AjaxControlToolkit; | ||
[assembly: WebResource("SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.js", "text/javascript")] | ||
namespace SharpMap.Presentation.Web.SharpLayers.Layers.Osm | ||
{ | ||
[ClientScriptResource("SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent", | ||
"SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.js")] | ||
[TargetControlType(typeof (Control))] | ||
public class OsmLayerComponent : LayerComponent<OsmLayerBuilderParams> | ||
{ | ||
protected override string ScriptComponentName | ||
{ | ||
get { return "SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent"; } | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Osm/OsmLayerComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* The attached / following is part of SharpMap.Presentation.Web.SharpLayers | ||
* SharpMap.Presentation.Web.SharpLayers is free software © 2008 Newgrove Consultants Limited, | ||
* www.newgrove.com; you can redistribute it and/or modify it under the terms | ||
* of the current GNU Lesser General Public License (LGPL) as published by and | ||
* available from the Free Software Foundation, Inc., | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA: http://fsf.org/ | ||
* This program is distributed without any warranty; | ||
* without even the implied warranty of merchantability or fitness for purpose. | ||
* See the GNU Lesser General Public License for the full details. | ||
* | ||
* Author: John Diss 2010 | ||
* | ||
*/ | ||
Type.registerNamespace('SharpMap.Presentation.Web.SharpLayers.Layers.Osm'); | ||
|
||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent = function() { | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.initializeBase(this); | ||
|
||
|
||
} | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.prototype = { | ||
initialize: function() { | ||
this._builderDelegate = Function.createDelegate(this, this._layerBuilderDelegate); | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.callBaseMethod(this, 'initialize'); | ||
}, | ||
dispose: function() { | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.callBaseMethod(this, 'dispose'); | ||
}, | ||
_layerBuilderDelegate: function() { | ||
var options = this.get_builderParams(); | ||
var url = options.url; | ||
delete options.url; | ||
return new OpenLayers.Layer.OSM(this.get_name(), url, options); | ||
} | ||
} | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent.registerClass('SharpMap.Presentation.Web.SharpLayers.Layers.Osm.OsmLayerComponent', SharpMap.Presentation.Web.SharpLayers.Layers.LayerComponent); |
59 changes: 59 additions & 0 deletions
59
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Yahoo/YahooLayerBuilderParams.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Web.UI; | ||
using AjaxControlToolkit; | ||
|
||
namespace SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo | ||
{ | ||
public class YahooLayerBuilderParams : LayerBuilderParamsBase, IGridBasedLayerBuilderParams | ||
{ | ||
|
||
[ExtenderControlProperty(true, true)] | ||
[ClientPropertyName("tileSize")] | ||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), | ||
PersistenceMode(PersistenceMode.InnerProperty)] | ||
public Size TileSize { get; set; } | ||
|
||
[ExtenderControlProperty] | ||
[ClientPropertyName("transitionEffect")] | ||
public TransitionEffects TransitionEffect { get; set; } | ||
|
||
[ExtenderControlProperty] | ||
[ClientPropertyName("buffer")] | ||
public int Buffer { get; set; } | ||
|
||
|
||
[ExtenderControlProperty] | ||
[ClientPropertyName("sphericalMercator")] | ||
public bool SphericalMercator | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
|
||
[ClientPropertyName("resolutions")] | ||
public override CollectionBase<DoubleValue> Resolutions | ||
{ | ||
get | ||
{ | ||
return base.Resolutions; | ||
} | ||
} | ||
//[ExtenderControlProperty] | ||
//[ClientPropertyName("mapType")] | ||
//public YahooMapType MapType //enabling this breaks everything else | ||
//{ | ||
// get; | ||
// set; | ||
//} | ||
|
||
} | ||
|
||
//public enum YahooMapType | ||
//{ | ||
// YAHOO_MAP_REG = 0, | ||
// YAHOO_MAP_HYB, | ||
// YAHOO_MAP_SAT | ||
//} | ||
} |
18 changes: 18 additions & 0 deletions
18
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Yahoo/YahooLayerComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Web.UI; | ||
using AjaxControlToolkit; | ||
|
||
[assembly: WebResource("SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.js", "text/javascript")] | ||
|
||
namespace SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo | ||
{ | ||
[ClientScriptResource("SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent", | ||
"SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.js")] | ||
[TargetControlType(typeof (Control))] | ||
public class YahooLayerComponent : LayerComponent<YahooLayerBuilderParams> | ||
{ | ||
protected override string ScriptComponentName | ||
{ | ||
get { return "SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent"; } | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
SharpLayers/SharpMap.Presentation.Web.SharpLayers/Layers/Yahoo/YahooLayerComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* The attached / following is part of SharpMap.Presentation.Web.SharpLayers | ||
* SharpMap.Presentation.Web.SharpLayers is free software © 2008 Newgrove Consultants Limited, | ||
* www.newgrove.com; you can redistribute it and/or modify it under the terms | ||
* of the current GNU Lesser General Public License (LGPL) as published by and | ||
* available from the Free Software Foundation, Inc., | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA: http://fsf.org/ | ||
* This program is distributed without any warranty; | ||
* without even the implied warranty of merchantability or fitness for purpose. | ||
* See the GNU Lesser General Public License for the full details. | ||
* | ||
* Author: John Diss 2010 | ||
* | ||
*/ | ||
Type.registerNamespace('SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo'); | ||
|
||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent = function() { | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.initializeBase(this); | ||
|
||
|
||
} | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.prototype = { | ||
initialize: function() { | ||
this._builderDelegate = Function.createDelegate(this, this._layerBuilderDelegate); | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.callBaseMethod(this, 'initialize'); | ||
}, | ||
dispose: function() { | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.callBaseMethod(this, 'dispose'); | ||
}, | ||
_layerBuilderDelegate: function() { | ||
var options = this.get_builderParams(); | ||
var mapType = options.mapType; | ||
delete options.mapType; | ||
if ((mapType)) | ||
options.type = mapType; | ||
return new OpenLayers.Layer.Yahoo(this.get_name(), options); | ||
} | ||
} | ||
SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent.registerClass('SharpMap.Presentation.Web.SharpLayers.Layers.Yahoo.YahooLayerComponent', SharpMap.Presentation.Web.SharpLayers.Layers.LayerComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,5 +29,7 @@ object IUICollectionItem.Value | |
} | ||
|
||
#endregion | ||
|
||
|
||
} | ||
} |