Thanks a lot Andreas, I tried "hacking" in a new OpenLayers.Layer.Google();
as the default base map in the MapPaneOL file, and it loaded fine until we
upgraded MapBuilder/OpenLayers now it gives me a JS error saying:
objRef.model.map.getExtent() has no properties
http://10.0.20.23:8080/GlobalView/lib/widget/MapPaneOL.js
Line 527
I also tried putting in these options:
var baseLayerOptions = {
units: units,
projection: proj.srsCode,
maxExtent: maxExtent,
maxResolution: maxResolution, //"auto" if not defined in the
context
minResolution: minResolution,
resolutions: resolutions,
alpha: false, //option for png transparency with
ie6
isBaseLayer: true,
displayOutsideMaxExtent: objRef.displayOutsideMaxExtent,
ratio: 1,
singleTile: true,
transitionEffect: objRef.transitionEffect,
visibility: false,
//moveTo: function(){return true}
minScale: 50000000,
maxScale: 1,
numZoomLevels: 20
};
What I am trying to do is use my standard WMC context with a Google base
map, and this worked in the previous version of MB and OL (In Firefox), does
anyone have experience with doing this or is it even possible?
Thanks in advance!
On Wed, Dec 3, 2008 at 11:29 AM, Andreas Hocevar <[email protected]>wrote:
> Hi,
>
> On Tue, Dec 2, 2008 at 8:11 PM, Robert Hicks <[email protected]> wrote:
> > Is it possible to load multiple contexts, one being WMC and the other
> OWS? I
> > want to use my existing WMC context but replace Demis with a base layer
> of
> > Google maps. Is there a better way to do this?
>
> I assume you are asking if it is possible to load multiple contexts
> for one map. Unfortunately not.
>
> Replacing Demis with GMaps does not only require exchanging a layer,
> but also switching to a different projection (EPSG:900913).
>
> If, however, you are familiar with JavaScript, you can register a
> listener for the context's loadModel event, and replace the base layer
> (config.objects.mainMap.map.baseLayer) with a Google layer. In that
> case you would just remove the demis layer from your context.
>
> Regards,
> Andreas.
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users