[OpenLayers-Users] MapGuide overlayer can't be initialized

carls carlshe at 163.com
Tue Sep 30 21:35:21 EDT 2008


The MapGuide Server I used is local, which works very well. (Version: 2.0.1)

follow is the code I writen with openlayers:

//////////////////////////////
                var params1 = {
                    mapdefinition:
'Library://Archives/Background/Map/BasicMap.MapDefinition'
                }
                var options1 = {
                    isBaseLayer:true,
                    singleTile: true
                }
                var l1 = new OpenLayers.Layer.MapGuide("MapGuide 1",
"http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&",
params1, options1);
                WebMap.addLayer(l1);

                var params2 = {
                    mapdefinition:
'Library://Archives/Projects/Map/PrjMap.MapDefinition',
                    locale: 'en'
                }
                var options2 = {
                    isBaseLayer: false,
                    singleTile: true
                }
                var l2 = new OpenLayers.Layer.MapGuide("MapGuide 2",
"http://localhost/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&",
params2, options2);
                WebMap.addLayer(l2);

///////////////////////

-- 
View this message in context: http://n2.nabble.com/MapGuide-overlayer-can%27t-be-initialized-tp1129544p1130494.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list