This issue still remains unresolved for me..<br>:(<br><br><div class="gmail_quote">On Tue, Sep 28, 2010 at 9:34 AM, IT Intern <span dir="ltr"><<a href="mailto:itintern12@gmail.com">itintern12@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ok, here is the full code to my map :)<br>
<br>
<html><br>
<head><br>
<title>GeoExt WMS Browser</title><br>
<br>
<script type="text/javascript" src="<a href="http://maps.google.com/maps/api/js?sensor=false" target="_blank">http://maps.google.com/maps/api/js?sensor=false</a>"></script> <br>
<script src="./ext-3.2.1/adapter/ext/ext-base.js" type="text/javascript"></script><br>
<script src="./ext-3.2.1/ext-all.js" type="text/javascript"></script><br>
<link rel="stylesheet" type="text/css" href="./ext-3.2.1/resources/css/ext-all.css"></link><br>
<!--<link rel="stylesheet" type="text/css"
href="./ext-3.2.1/resources/css/xtheme-access.css"></link>--><br>
<script src="./GeoExt/lib/GeoExt.js" type="text/javascript"></script><br>
<link rel="stylesheet" type="text/css" href="./GeoExt/resources/geoext-all-debug.css"></link><br>
<br>
<link rel="stylesheet" href="<a href="http://openlayers.org/api/theme/default/style.css" target="_blank">http://openlayers.org/api/theme/default/style.css</a>" type="text/css" /> <br>
<link rel="stylesheet" href="<a href="http://openlayers.org/dev/examples/style.css" target="_blank">http://openlayers.org/dev/examples/style.css</a>" type="text/css" /> <br>
<script src="<a href="http://www.openlayers.org/api/OpenLayers.js" target="_blank">http://www.openlayers.org/api/OpenLayers.js</a>"></script> <br>
<br>
<script type="text/javascript"><br>
Ext.BLANK_IMAGE_URL = "./ext-3.2.1/resources/images/default/s.gif";<br>
<br>
Ext.onReady(function() {<div class="im"><br>
<br>
var ghyb = new OpenLayers.Layer.Google(<br>
"Google Hybrid",<br>
{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}<br>
);<br>
<br>
var gmap = new OpenLayers.Layer.Google(<br>
"Google Streets", // the default<br>
{numZoomLevels: 20} <br></div>
);<br>
<br>
var gphy = new OpenLayers.Layer.Google(<br>
"Google Physical",<br>
{type: google.maps.MapTypeId.TERRAIN},{visibility: true}<br>
// used to be {type: G_PHYSICAL_MAP}<div class="im"><br>
);<br>
<br>
<br>
var osm = new OpenLayers.Layer.OSM();<br>
<br></div>
var all_chn = new OpenLayers.Layer.WMS(<br>
"All Points Chinese trans",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:ALL _CHN_NAMES',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
); <br>
<br>
var all_tib = new OpenLayers.Layer.WMS(<br>
"All Points Tibetan trans",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:ALL _TIB_NAMES',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_bridges = new OpenLayers.Layer.WMS(<br>
"Bridges (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_bridges',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_bridges = new OpenLayers.Layer.WMS(<br>
"Bridges (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_bridges',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_countys = new OpenLayers.Layer.WMS(<br>
"Counties (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_countys',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_countys = new OpenLayers.Layer.WMS(<br>
"Counties (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_countys',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_farms = new OpenLayers.Layer.WMS(<br>
"Farms (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_farms',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_farms = new OpenLayers.Layer.WMS(<br>
"Farms (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_farms',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_glaciers = new OpenLayers.Layer.WMS(<br>
"Glaciers (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_glaciers',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_glaciers = new OpenLayers.Layer.WMS(<br>
"Glaciers (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_glaciers',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_grazing = new OpenLayers.Layer.WMS(<br>
"Grazing Points (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers:
'cite:chn_grazing_points', transparent: true}, {isBaseLayer: false,
displayInLayerSwitcher: true, visibility: false} <br>
);<br>
<br>
var tib_grazing = new OpenLayers.Layer.WMS(<br>
"Grazing Points (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers:
'cite:tib_grazing_points', transparent: true}, {isBaseLayer: false,
displayInLayerSwitcher: true, visibility: false} <br>
);<br>
<br>
var chn_hwyCrew = new OpenLayers.Layer.WMS(<br>
"Highway Maintenance Crew (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers:
'cite:chn_highway_maintenance_crews', transparent: true}, {isBaseLayer:
false, displayInLayerSwitcher: true, visibility: false} <br>
);<br>
<br>
var tib_hwyCrew = new OpenLayers.Layer.WMS(<br>
"Highway Maintenance Crew (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers:
'cite:tib_highway_maintenance_crews', transparent: true}, {isBaseLayer:
false, displayInLayerSwitcher: true, visibility: false} <br>
);<br>
<br>
var chn_hospitals = new OpenLayers.Layer.WMS(<br>
"Hospitals (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_hospitals',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false}<br>
);<br>
<br>
var tib_hospitals = new OpenLayers.Layer.WMS(<br>
"Hospitals (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_hospitals',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_lakes = new OpenLayers.Layer.WMS(<br>
"Lakes (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_lakes',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_lakes = new OpenLayers.Layer.WMS(<br>
"Lakes (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_lakes',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: true} <br>
);<br>
<br>
var chn_monastaries = new OpenLayers.Layer.WMS(<br>
"Monastaries (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_monasterys',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_monastaries = new OpenLayers.Layer.WMS(<br>
"Monastaries (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_monasterys',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_pass = new OpenLayers.Layer.WMS(<br>
"Pass (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_pass',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_pass = new OpenLayers.Layer.WMS(<br>
"Pass (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_pass',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var chn_rivers = new OpenLayers.Layer.WMS(<br>
"Rivers (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_rivers',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_rivers = new OpenLayers.Layer.WMS(<br>
"Rivers (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_rivers',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false}<br>
);<br>
<br>
var chn_townships = new OpenLayers.Layer.WMS(<br>
"Townships (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_townships',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false}<br>
);<br>
<br>
var tib_townships = new OpenLayers.Layer.WMS(<br>
"Townships (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_townships',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: true} <br>
);<br>
<br>
var chn_villages = new OpenLayers.Layer.WMS(<br>
"Villages (Chinese trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:chn_villages',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: false} <br>
);<br>
<br>
var tib_villages = new OpenLayers.Layer.WMS(<br>
"Villages (Tibetan trans)",
"<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>", {layers: 'cite:tib_villages',
transparent: true}, {isBaseLayer: false, displayInLayerSwitcher: true,
visibility: true} <br>
);<div class="im"><br>
<br>
var options = {<br>
controls: [new OpenLayers.Control.Navigation()],<br>
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),<br>
//maxResolution: "auto",<br>
//projection: new OpenLayers.Projection("EPSG:900913"),<br>
units: 'm',<br>
allOverlays: false<br>
}<br>
<br></div><div class="im">
var mapPanel = new GeoExt.MapPanel({<br>
title: "Map",<br>
map: options,<br>
//center: map.setCenter(new OpenLayers.LonLat(93.9,
29.53).transform(new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject())),<br>
center: new OpenLayers.LonLat(93.9, 29.53).transform(new
OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:900913")),<br>
zoom: 9, <br>
region: "center",<br>
bbar: [{<br>
xtype: "label",<br>
text: "Scale = 1 : "<br>
}],<br>
items: [{<br>
xtype: "gx_zoomslider",<br>
vertical: true,<br>
height: 300,<br>
x: 10,<br>
y: 20,<br>
plugins: new GeoExt.ZoomSliderTip()<br>
}]<br>
});<br>
<br>
var map = mapPanel.map;<br>
map.addLayers([gphy, gmap, ghyb, osm, all_chn, all_tib,
chn_bridges, tib_bridges, chn_countys, tib_countys, chn_farms,
tib_farms, chn_glaciers, tib_glaciers, chn_grazing, tib_grazing,
chn_hwyCrew, tib_hwyCrew, chn_hospitals, tib_hospitals, chn_lakes,
tib_lakes, chn_monastaries, tib_monastaries, chn_pass, tib_pass,
chn_rivers, tib_rivers, chn_townships, tib_townships, chn_villages,
tib_villages]); <br>
<br>
<br></div>
var tibNaturalLayers = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [tib_villages, tib_rivers, tib_lakes, tib_grazing, tib_glaciers]<br>
});<br>
<br>
var chnNaturalLayers = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [chn_villages, chn_rivers, chn_lakes, chn_grazing, chn_glaciers]<br>
});<br>
<br>
var tibPointOfInterest = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [tib_pass, tib_monastaries, tib_hospitals, tib_hwyCrew, tib_bridges]<br>
});<br>
<br>
var chnPointOfInterest = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [chn_pass, chn_monastaries, chn_hospitals, chn_hwyCrew, chn_bridges]<br>
});<br>
<br>
var tibLands = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [tib_villages, tib_townships, tib_farms, tib_countys]<br>
});<br>
<br>
var chnLands = new GeoExt.data.LayerStore({<br>
map: map,<br>
initDir: 0,<br>
layers: [chn_villages, chn_townships, chn_farms, chn_countys]<div class="im"><br>
});<br>
<br>
var layerRoot = new Ext.tree.TreeNode({<br>
text: "All Layers",<br>
expanded: true<br></div>
});<div class="im"><br>
<br>
layerRoot.appendChild(new GeoExt.tree.BaseLayerContainer({<br>
text: "Base Layers",<br>
map: map,<br>
layerStore: mapPanel.layers,<br>
expanded: true<br></div>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Natural Selection (Tibetan trans)",<br>
layerStore: tibNaturalLayers,<br>
expanded: false,<br>
loader: {param: "LAYERS"}<br>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Natural Selection (Chinese trans)",<br>
layerStore: chnNaturalLayers,<br>
expanded: false,<br>
loader: {param: "LAYERS"}<br>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Points of Interest (Tibetan trans)",<br>
layerStore: tibPointOfInterest,<br>
expanded: false,<br>
loader: {param: "LAYERS"}<br>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Points of Interest (Chinese trans)",<br>
layerStore: chnPointOfInterest,<br>
expanded: false,<br>
loader: {param: "LAYERS"}<br>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Lands (Tibetan trans)",<br>
layerStore: tibLands,<br>
expanded: false,<br>
loader: {param: "LAYERS"}<br>
}));<br>
<br>
layerRoot.appendChild(new GeoExt.tree.OverlayLayerContainer({<br>
text: "Lands (Chinese trans)",<br>
layerStore: chnLands,<br>
expanded: false,<br>
loader: {param: "LAYERS", baseAttrs: {iconCls: 'myClass'}}<br>
}));<br>
<br>
var layerTree = new Ext.tree.TreePanel({<br>
region: "west",<br>
title: "Map Layers", <br>
root: layerRoot,<br>
loader: new Ext.tree.TreeLoader({applyLoader: false}),<br>
enableDD: true,<br>
collapsible: true,<br>
width: 300,<br>
expanded: true<br>
});<br>
<br>
<br>
var scaleCombo = new Ext.form.ComboBox({<br>
width: 130,<br>
mode: "local",<br>
emptyText: "Scale",<br>
triggerAction: "all",<br>
displayField: "scale",<br>
store: new GeoExt.data.ScaleStore({<br>
map: mapPanel.map<br>
}),<br>
listeners: {<br>
select: function(combo, record) {<br>
mapPanel.map.zoomTo(record.get("level"));<br>
}<br>
}<br>
});<br>
<br>
mapPanel.map.events.register("zoomend", this, function() {<br>
scaleCombo.setValue(mapPanel.map.getScale());<br>
});<br>
mapPanel.getBottomToolbar().add(scaleCombo);<br>
<br>
<br>
<br>
<br>
/*var tree = new Ext.tree.TreePanel({<br>
region: "west",<br>
title: "Map Layers",<br>
width: 200,<br>
autoScroll: true,<br>
enableDD: true,<br>
lines: true,<br>
rootVisible: true,<br>
root: new GeoExt.tree.LayerContainer({<div class="im"><br>
layerStore: mapPanel.layers,<br>
expanded: true<br></div>
}),<br>
bbar: [{<br>
text: "Remove from Map",<br>
handler: function() {<br>
var node = tree.getSelectionModel().getSelectedNode();<br>
if(node) {<br>
mapPanel.map.removeLayer(node.layer);<br>
}<br>
}<br>
}]<br>
});*/<br>
<br>
var legend = new GeoExt.LegendPanel({<br>
region: "east",<br>
title: "Legend",<br>
width: 200,<br>
autoScroll: true,<br>
layerStore: mapPanel.layers<div class="im"><br>
});<br>
<br>
new Ext.Panel({<br>
width: 1800,<br>
height: 600,<br>
layout: "border",<br>
renderTo: document.body,<br></div>
items: [layerTree, mapPanel, legend]<br>
//items: [mapPanel, groupLayerNode]<br>
});<br>
<br>
<br>
var info = new OpenLayers.Control.WMSGetFeatureInfo({<br>
url: '<a href="http://10.0.102.11:8080/geoserver/wms" target="_blank">http://10.0.102.11:8080/geoserver/wms</a>',<br>
title: 'Identify features by clicking',<br>
queryVisible: true,<br>
eventListeners: {<br>
getfeatureinfo: function(event){<br>
if(event.text.length != 687) {<br>
map.addPopup(new OpenLayers.Popup.FramedCloud(<br>
"chicken",<br>
map.getLonLatFromPixel(event.xy),<br>
null,<br>
event.text + '<div>name: Hello!</div>',<br>
null,<br>
true<br>
));<br>
}<br>
}<br>
}<br>
});<br>
map.addControl(info);<br>
info.activate(); <br>
<br>
});<br>
</script><br>
</head><br>
<body><br>
</body><br>
</html><br>
<br>
Thank you,<br>
<br>
elshae<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Sep 28, 2010 at 6:59 AM, Sarah Schuessler <span dir="ltr"><<a href="mailto:sarah_flip@yahoo.de" target="_blank">sarah_flip@yahoo.de</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div><div>Without any code we can`t say anything.<br>Did you checked misspelling, code mistakes?<br><br>best regards<br>Sarah</div>
</div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div><font face="Tahoma" size="2"><hr size="1">
<b><span style="font-weight: bold;">Von:</span></b> IT Intern <<a href="mailto:itintern12@gmail.com" target="_blank">itintern12@gmail.com</a>><br><b><span style="font-weight: bold;">An:</span></b> <a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a><br>
<b><span style="font-weight: bold;">Gesendet:</span></b> Dienstag, den 28. September 2010, 0:18:20 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [Users] Base Layer Does Not Display on Initial Load<br>
</font><br></div><div><div></div><div>Also if it helps any, I'm getting the following errors in my firebug
console...<br><br><span><div>OpenLayers is not defined</div>
<span></span><div><img src="" title="Break on this error"><a rel="nofollow"> symbolizers: [OpenLayers.Feature.Vector.style["default"]],
</a><a rel="nofollow"><div>Featur...erer.js (line 36)<br><br></div></a></div></span><div><span><div>
<span></span>OpenLayers is not defined</div><span></span><div><img src="" title="Break on this error"><a rel="nofollow"> "eq": OpenLayers.Filter.Comparison.EQUAL_TO,
</a><a rel="nofollow"><div>form.js (line 78)</div></a></div></span></div><div><div><br>I've yet to conquer this issue so any other advices would be great and very much appreciated :)<br>
<br>Thank you,<br><br>elshae<br></div></div><br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 11:46 AM, IT Intern <span dir="ltr"><<a rel="nofollow" href="mailto:itintern12@gmail.com" target="_blank">itintern12@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Andreas,<br><br>I have added the other changes you recommended. Everything looks good, except now it is back to what I started with. The Google Base layer loads first and as my overlays are loading, it disappears. I am positive that all my overlays are transparent...<div>
<br>
<br>var options = {<br> controls: [new OpenLayers.Control.Navigation()],<br> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),<br></div> units: 'm',<br>
allOverlays: false<br> }<br><div><br>var mapPanel = new GeoExt.MapPanel({<br> title: "Map",<br> map: options,<br> //center: map.setCenter(new OpenLayers.LonLat(93.9, 29.53).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject())),<br>
</div>
center: new OpenLayers.LonLat(93.9, 29.53).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")),<div><br> zoom: 9, <br>
region: "center",<br>
bbar: [{<br> xtype: "label",<br> text: "Scale = 1 : "<br> }],<br> items: [{<br> xtype: "gx_zoomslider",<br>
vertical: true,<br> height: 300,<br> x: 10,<br> y: 20,<br> plugins: new GeoExt.ZoomSliderTip()<br> }]<br> });<br>
<br>var map = mapPanel.map;<br> map.addLayers([gphy, gmap, ghyb, osm, all_chn, all_tib, chn_bridges, tib_bridges, chn_countys, tib_countys, chn_farms, tib_farms, chn_glaciers, tib_glaciers, chn_grazing, tib_grazing, chn_hwyCrew, tib_hwyCrew, chn_hospitals, tib_hospitals, chn_lakes, tib_lakes, chn_monastaries, tib_monastaries, chn_pass, tib_pass, chn_rivers, tib_rivers, chn_townships, tib_townships, chn_villages, tib_villages]); <br>
<br><br></div>Thanks, <br><br>elshae<div><div></div><div><br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 11:38 AM, Andreas Hocevar <span dir="ltr"><<a rel="nofollow" href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Three things:<br>
<br>
* don't use map.getProjectionObject() in your transform - it is not available yet<br>
* don't use maxResolution: "auto".<br>
* remove the renderTo config option from your MapPanel.<br>
<font color="#888888"><br>
-Andreas.<br>
</font><div><div></div><div><br>
On Sep 27, 2010, at 17:21 , IT Intern wrote:<br>
<br>
> Andreas,<br>
><br>
> Sigh, it's still not working out for me. Now no base layer is coming up, my zoom slider is not in the right position, and my map div is once again in its own container :(<br>
><br>
> This is the code with the changes I have understood I should make:<br>
><br>
> var options = {<br>
> controls: [new OpenLayers.Control.Navigation()],<br>
> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),<br>
> maxResolution: "auto",<br>
> projection: new OpenLayers.Projection("EPSG:900913"),<br>
> units: 'm',<br>
> allOverlays: false<br>
> }<br>
><br>
><br>
> //var map = new OpenLayers.Map(options);<br>
> //map.addLayers([gphy, gmap, ghyb, osm, all_chn, all_tib, chn_bridges, tib_bridges, chn_countys, tib_countys, chn_farms, tib_farms, chn_glaciers, tib_glaciers, chn_grazing, tib_grazing, chn_hwyCrew, tib_hwyCrew, chn_hospitals, tib_hospitals, chn_lakes, tib_lakes, chn_monastaries, tib_monastaries, chn_pass, tib_pass, chn_rivers, tib_rivers, chn_townships, tib_townships, chn_villages, tib_villages]);<br>
><br>
> var mapPanel = new GeoExt.MapPanel({<br>
> title: "Map",<br>
> map: options,<br>
> //center: map.setCenter(new OpenLayers.LonLat(93.9, 29.53).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject())),<br>
> center: new OpenLayers.LonLat(93.9, 29.53).transform(new OpenLayers.Projection("EPSG:4326")),//, map.getProjectionObject()),<br>
> renderTo: document.body,<br>
> width: 1500,<br>
> height: 600,<br>
> zoom: 9,<br>
> region: "center",<br>
> bbar: [{<br>
> xtype: "label",<br>
> text: "Scale = 1 : "<br>
> }],<br>
> items: [{<br>
> xtype: "gx_zoomslider",<br>
> vertical: true,<br>
> height: 300,<br>
> x: 10,<br>
> y: 20,<br>
> plugins: new GeoExt.ZoomSliderTip()<br>
> }]<br>
> });<br>
><br>
> var map = mapPanel.map;<br>
><br>
> map.addLayers([gphy, gmap, ghyb, osm, all_chn, all_tib, chn_bridges, tib_bridges, chn_countys, tib_countys, chn_farms, tib_farms, chn_glaciers, tib_glaciers, chn_grazing, tib_grazing, chn_hwyCrew, tib_hwyCrew, chn_hospitals, tib_hospitals, chn_lakes, tib_lakes, chn_monastaries, tib_monastaries, chn_pass, tib_pass, chn_rivers, tib_rivers, chn_townships, tib_townships, chn_villages, tib_villages]);<br>
><br>
> Thank you,<br>
><br>
> elshae<br>
><br>
><br>
</div></div></blockquote></div></div></div></blockquote></div></div></div></div></div>
</div><br></div><br></div></div><div class="im">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>