Hi ThinkGeo,
WMSOverlay. WrapDateline does not wrap date line. Is there something I need to do at WMS implementation?
Regards,
Anil
Hi ThinkGeo,
WMSOverlay. WrapDateline does not wrap date line. Is there something I need to do at WMS implementation?
Regards,
Anil
Anil,
I tested our WrapDateLineSample of "HowDoISample", the wrap date line works for me.
Could you let me know how did you use that property?
Regards,
Don
Hi Don,
I am using following code where wmsOverlay is of type WmsOverlay
wmsOverlay.WrapDateline = WrapDatelineMode.WrapDateline;
Regards,
Anil
Anil,
Your code looks just the same as our HowDoISample used.
Our WrapDateline in web edition from the same function of OpenLayers, so I think that should be related with your using WMS server and setting.
Could you provide a really simple sample so that we can have a look at that?
Regards,
Don
Hi ThinkGeo,
If I use plugin for normal Map (Decimal Degree) then map do wrap across the DateLine.
However If I use Plginin ussing Spherical Projection "ESPG:90013" then Map boundary stops at Date Line.
I use following method to define my WSMOverlay which uses 2 URI.
Regards,
Anil
public static WmsOverlay DefineBaseWMSOverlay(Map Map1)
{
//
String keyMapUri = "WmsMapUri";
String keyMapUri2 = "WmsMapUri2";
String keyWmsPluginLayer = "WmsPluginLayer";
String valMapUri = ConfigurationManager.AppSettings[keyMapUri];
String valMapUri2 = ConfigurationManager.AppSettings[keyMapUri2];
String valWmsPluginLayer = ConfigurationManager.AppSettings[keyWmsPluginLayer];
WmsOverlay wmsOverlay = null;
if ((null != valMapUri) && valMapUri.Length > 0)
{
wmsOverlay = new WmsOverlay("MyWMS");
wmsOverlay.Parameters.Add("LAYERS", valWmsPluginLayer);
wmsOverlay.Parameters.Add("STYLES", "DEFAULT");
wmsOverlay.SetBaseEpsgProjection("EPSG:900913");
wmsOverlay.TileType = TileType.MultipleTile;
wmsOverlay.TileHeight = 256;
wmsOverlay.TileWidth = 256;
wmsOverlay.WrapDateline = WrapDatelineMode.WrapDateline;
wmsOverlay.ServerUris.Add(new Uri(valMapUri));
if ((null != valMapUri2) && valMapUri2.Length > 0)
{
wmsOverlay.ServerUris.Add(new Uri(valMapUri2));
}
Map1.CustomOverlays.Add(wmsOverlay);
}
return wmsOverlay;
}
HI ThinkGeo,
I am getting the same porblem with WorldMapKitWmsWebOverlay using projection WorldMapKitProjection.SphericalMercator;
Regards,
Anil
Hi Anil,
Thanks for your report.
It looks we sure have some problem there.
I will update this post if we make sure that’s a bug and fixed it.
Regards,
Don
Hi Anil,
Here we have a workaround.
Please add the code as below in the head tag of your page:
<script type=“text/javascript”>
var OnMapCreating = function (map) {
map.setOptions({ ‘maxExtent’: new OpenLayers.Bounds(-20001365, -20001365, 20001365, 20001365) });
};
</script>
This will makes WrapDateline works well if your mapunit is meter.
Regards,
Don