On Sep 16, 2010, at 2:04 AM, ext P Kishor wrote:

> On Thu, Sep 16, 2010 at 12:36 AM,  <christopher.schm...@nokia.com> wrote:
>> 
>> On Sep 15, 2010, at 5:53 PM, ext P Kishor wrote:
>> 
>>> When I ask OL to fetch WMS layers, they get stuffed into automatically
>>> generated divs with ids like "OpenLayers.Layer.WMS_283" and
>>> "OpenLayers.Layer.WMS_285" and so on. The numbers at the end seem to
>>> be increasing by 2, but what number they start with doesn't seem to be
>>> predictable. Layers drawn before these specific layers have 35, 37,
>>> 39, 41 tacked on the end.
>> 
>> It is actually somewhat predictible -- IDs are monotonically increasing,
>> so each time we call getUniqueId(), we get one number more. Layers actually
>> create multiple elements, which is why the increase of 2.
> 
> Right, the increment is predictable, but the starting id is... what?
> Why didn't the ids just start at 0 or 1 and then move on forward,
> regenerating on every call (assuming statelessness and all that).

WMS layers aren't the only things that use IDs. Pretty much every 
element in an OpenLayers map uses one, as well as many things that
aren't elements. The reason I say they're predicible is that they're
based (almost) entirely on things that are done linearly, based on
the order of your code.

Of course, if you change the order you add your layers in, all of a 
sudden everything breaks :) So it's not designed to be usable externally.

>> 
>>> 
>>> The aforementioned div, one per layer, has another div with no id or
>>> name, and within that div is the actual img with an id like
>>> "OpenLayersDiv293" (the image 293 is inside div 283). Here is the
>>> strange thing... there are actually two images within that numbered
>>> div. It actually looks like so (easier to show the code than to
>>> describe it)
>> 
>> I guess your'e creating a single tile WMS with a transitioneffect?
>> one of these images is presumably disabled... I dunno, this particular
>> setup seems either incomplete or odd.
> 
> No, no transition effect or any effect. These are the plain vanilla of layers.
> 
>            new OpenLayers.Layer.WMS(
>                "name,
>                wms_server,
>                {
>                    layers: name,
>                    format: "image/gif",
>                    transparent: true,
>                    isBaseLayer: false,
>                    reproject: true
>                },
>                {
>                    visibility: true,
>                    singleTile: true,
>                    sphericalMercator: true
>                }
>            );

Weird. I see the same behavior. I can't explain it off the top of
my head.

>>> <div id="OpenLayers.Layer.WMS_283">
>>>    <div><img id="OpenLayersDiv293" src="..?layers=one"></div>
>>>    <div><img id="OpenLayersDiv303" src="..?layers=two"></div>
>>>    ..
>>> </div>
>>> 
>>> Objective -- I am trying to overlay a bunch of georeferenced images on
>>> a map div, within a known div.
>> 
>> I don't understand what you mean by this statement. More information might
>> help.
> 
> I am trying to set up a georeferenced animation. I have several options --
> 
> 1. get MapServer to create the images for me, and composite them into
> one. But, I am not sure how or if I could create an animation out of
> them;
> 
> 2. create the anim myself.
> 
> So, #2.
> 
> a. I create my images,
> b. georeference them by copying geo headers into them via geotifcp
> c. display them on the map
> d. animate them
> 
> [a-c] above are easy. To do 'd,' I put them inside a div, and then
> create a "carousel" kinda application using jQuery. To make things
> even better, I have a jQuery slider that can control which image is
> being shown. This way, the user can "scrub" back and forth, looking at
> different frames of the anim, a lot better than creating a anim gif
> that can't be controlled.

To me, the way I would handle this is just a set of Layer.Images or
Layer.WMSes? I mean, a singleTile layer isn't that heavy (though I guess
it is 50% heavier than i thought it was ;)) -- it's just 3 elements.
Adding a bunch of them, and then having your Javascript loop through
and turn them on and off, shouldn't be that expensive, and fits much
more in line with OpenLayers than anything else I can understand about
what your'e asking so far.

Does that start to head in the right direction?

-- Chris 

_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to