Hey Phil,
I got that all sorted out...It was just a matter of putting the two snippets of code in the correct place and in the correct order. Basically the final solution looking like:
Thanks again for all the help. I do have a few more questions in regards to selecting information from a line layer file but Ill start a new thread.
Thanks,
Kevin
function OnMapCreating(map) {
map.events.register('moveend', map, function (e) {
var currentExtent = e.object.getExtent();
var args = currentExtent.left + ',' + currentExtent.top + ',' + currentExtent.right + ',' + currentExtent.bottom;
<%=ClientScript.GetCallbackEventReference(this, "args", "Map1ExtentChangedCompleted", "map") %>
});
OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control.OverviewMap, {
updateOverview: function () {
var zoom = map.getZoom();
var targetRes = this.map.getResolutionForZoom(4);
var center;
if (this.ovmap.getProjection() != this.map.getProjection()) {
center = this.map.center.clone();
center.transform(this.map.getProjectionObject(), this.ovmap.getProjectionObject());
}
else {
center = this.map.center;
}
this.ovmap.setCenter(center, this.ovmap.getZoomForResolution(targetRes * this.resolutionFactor));
this.updateRectToMap();
}
});
OpenLayers.Control.PanZoomBar.prototype.buttonDown = function (evt) {
if (!OpenLayers.Event.isLeftClick(evt)) {
return;
}
switch (this.action) {
case "panup":
this.map.pan(0, -this.getSlideFactor("h"));
break;
case "pandown":
this.map.pan(0, this.getSlideFactor("h"));
break;
case "panleft":
this.map.pan(-this.getSlideFactor("w"), 0);
break;
case "panright":
this.map.pan(this.getSlideFactor("w"), 0);
break;
case "zoomin":
this.map.zoomIn();
break;
case "zoomout":
this.map.zoomOut();
break;
case "zoomworld":
var bounds = new OpenLayers.Bounds(-14281142.226965, 6100819.4578717, -10876716.354163, 8503943.6033795);
this.map.zoomToExtent(bounds);
break;
}
OpenLayers.Event.stop(evt);
}
}
var Map1ExtentChangedCompleted = function(result, context){
alert(result);
}