[Users] Base Layer Does Not Display on Initial Load
Sarah Schuessler
sarah_flip at yahoo.de
Tue Sep 28 12:59:12 CEST 2010
Without any code we can`t say anything.
Did you checked misspelling, code mistakes?
best regards
Sarah
________________________________
Von: IT Intern <itintern12 at gmail.com>
An: users at geoext.org
Gesendet: Dienstag, den 28. September 2010, 0:18:20 Uhr
Betreff: Re: [Users] Base Layer Does Not Display on Initial Load
Also if it helps any, I'm getting the following errors in my firebug console...
OpenLayers is not defined
symbolizers: [OpenLayers.Feature.Vector.style["default"]], Featur...erer.js
(line 36)
OpenLayers is not defined
"eq": OpenLayers.Filter.Comparison.EQUAL_TO, form.js (line 78)
I've yet to conquer this issue so any other advices would be great and very much
appreciated :)
Thank you,
elshae
On Mon, Sep 27, 2010 at 11:46 AM, IT Intern <itintern12 at gmail.com> wrote:
Andreas,
>
>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...
>
>
>var options = {
> controls: [new OpenLayers.Control.Navigation()],
> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
>20037508.34, 20037508.34),
> units: 'm',
> allOverlays: false
> }
>
>
>var mapPanel = new GeoExt.MapPanel({
> title: "Map",
> map: options,
> //center: map.setCenter(new OpenLayers.LonLat(93.9,
>29.53).transform(new OpenLayers.Projection("EPSG:4326"),
>map.getProjectionObject())),
>
center: new OpenLayers.LonLat(93.9, 29.53).transform(new
OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")),
>
> zoom: 9,
> region: "center",
> bbar: [{
> xtype: "label",
> text: "Scale = 1 : "
> }],
> items: [{
> xtype: "gx_zoomslider",
> vertical: true,
> height: 300,
> x: 10,
> y: 20,
> plugins: new GeoExt.ZoomSliderTip()
> }]
> });
>
>var map = mapPanel.map;
> 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]);
>
>
>
>Thanks,
>
>elshae
>
>
>
>On Mon, Sep 27, 2010 at 11:38 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>
>Three things:
>>
>> * don't use map.getProjectionObject() in your transform - it is not available
>>yet
>> * don't use maxResolution: "auto".
>> * remove the renderTo config option from your MapPanel.
>>
>>-Andreas.
>>
>>
>>On Sep 27, 2010, at 17:21 , IT Intern wrote:
>>
>>> Andreas,
>>>
>>> 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 :(
>>>
>>> This is the code with the changes I have understood I should make:
>>>
>>> var options = {
>>> controls: [new OpenLayers.Control.Navigation()],
>>> maxExtent: new OpenLayers.Bounds(-20037508.34,
>>>-20037508.34, 20037508.34, 20037508.34),
>>> maxResolution: "auto",
>>> projection: new OpenLayers.Projection("EPSG:900913"),
>>> units: 'm',
>>> allOverlays: false
>>> }
>>>
>>>
>>> //var map = new OpenLayers.Map(options);
>>> //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]);
>>>
>>> var mapPanel = new GeoExt.MapPanel({
>>> title: "Map",
>>> map: options,
>>> //center: map.setCenter(new OpenLayers.LonLat(93.9,
>>>29.53).transform(new OpenLayers.Projection("EPSG:4326"),
>>>map.getProjectionObject())),
>>> center: new OpenLayers.LonLat(93.9, 29.53).transform(new
>>>OpenLayers.Projection("EPSG:4326")),//, map.getProjectionObject()),
>>> renderTo: document.body,
>>> width: 1500,
>>> height: 600,
>>> zoom: 9,
>>> region: "center",
>>> bbar: [{
>>> xtype: "label",
>>> text: "Scale = 1 : "
>>> }],
>>> items: [{
>>> xtype: "gx_zoomslider",
>>> vertical: true,
>>> height: 300,
>>> x: 10,
>>> y: 20,
>>> plugins: new GeoExt.ZoomSliderTip()
>>> }]
>>> });
>>>
>>> var map = mapPanel.map;
>>>
>>> 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]);
>>>
>>> Thank you,
>>>
>>> elshae
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100928/36c482dd/attachment.htm
More information about the Users
mailing list