On Thu, Sep 16, 2010 at 12:36 AM,  <[email protected]> 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).

>
>>
>> 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
                }
            );

>
>> <div id="OpenLayers.Layer.WMS_283">
>>    <div><img id="OpenLayersDiv293" src="..?layers=one"></div>
>>    <div><img id="OpenLayersDiv347" src="..?layers=one"></div>
>> </div>
>>
>> <div id="OpenLayers.Layer.WMS_285">
>>    <div><img id="OpenLayersDiv303" src="..?layers=two"></div>
>>    <div><img id="OpenLayersDiv345" src="..?layers=two"></div>
>> </div>
>>
>> and so on.
>>
>> Questions:
>>
>> - Can I get these div ids programmatically?
>> - Even better, can I specify what these div ids should be?
>
> No, and the fact that you want to makes me think that you actually want 
> something
> else :)

yes, see below.

>
>> - Can I get the image ids programmatically, or, even better, specify
>> my own (of course, ensuring they are unique)?
>
> Possibly, and no, but the fact that you want to makes me think that you 
> actually
> want something else.

yes, see below.

>
>> - Can I draw them in a single div like so (this is reaaaaly far-fetched)?
>
> No. Visibility of layers is controlled by changing the visibility of the
> parent layer, so this would mean that you would turn off visibility of
> both layers. But you can set layers: 'one,two' in the code to request
> them together.
>

That's an idea. I should try that.

>> <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.




>
>>
>> --
>> Puneet Kishor
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to