[OpenLayers-Dev] New, sexy, popups -- I need your help! -- GIMP/Inkscape users?

Erik Uzureau euzuro at gmail.com
Wed Feb 20 11:08:01 EST 2008


On Feb 20, 2008 5:25 AM, Rupert de Guzman <rndguzmanjr at gmail.com> wrote:
> Hi Erik,
>
> [1] Applying the patch from
> http://trac.openlayers.org/attachment/ticket/926/popups.patch to the
> trunk(currently @ r6327now)  was bailing on me. However, patch on
> trunk at r6325 works like a charm. Afterwards, I copied all the related
> images from the sandbox
> (http://svn.openlayers.org/sandbox/euzuro/pop/img/).  This is just for
> future reference..
>
> rupert-debian:/home/rupert/svn co -r 6325
> http://svn.openlayers.org/trunk/openlayers OpenLayers
> rupert-debian:/home/rupert/OpenLayers# patch -p0 < popups.patch
> patching file theme/default/style.css
> patching file theme/default/framedCloud.css
> patching file lib/OpenLayers/Popup/FramedCloud.js
> patching file lib/OpenLayers/Popup/AmberCloud.js
> patching file lib/OpenLayers/Popup/Framed.js
> patching file lib/OpenLayers/Popup/AnchoredBubble.js
> patching file lib/OpenLayers/Popup/Anchored.js
> patching file lib/OpenLayers/Popup.js
> patching file lib/OpenLayers/Util.js
> patching file lib/OpenLayers.js
> patching file examples/framedPopups.html
> rupert-debian:/home/rupert/OpenLayers# svn update
> At revision 6327.
>
> [2] Frame is messed up when the popup (FrameCloud) is inverted. For
> reference, please see my attached images (good_popup.gif vs
> bad_popup.gif).  At first glance, I thought the image was not
> transparent.  But I opened it in Photoshop and it is indeed
> transparent.

ack! it's true. When pierre made me that file it was like 3 in the
morning in idaho
and I wasn't quite with my senses. my apologies: it is something I
will fix soon.

> [3] Currently, we have decided to use AmberCloud because of [2]. is
> there a way/hack to Framed.js that would always show the popup in the
> upper position, just like the AmberCloud does? Does it make sense?

yes, absolutely. if you set the 'fixedRelativePosition' and
'relativePosition' properties
just like they are set in the AmberCloud, then you should be golden:

You can either do:

OpenLayers.Popup.FramedCloud.prototype.fixedRelativePosition = true;
OpenLayers.Popup.FramedCloud.prototype.relativePosition = "tr";

(in your html file )


or directly modify these properties in the FramedCloud.js file:

    /**
     * APIProperty: fixedRelativePosition
     * {Boolean} The Framed Cloud popup works in just one fixed position.
     */
    fixedRelativePosition: true,

    /**
     * APIProperty: relativePosition
     * {String} Framed Cloud popup always goes top right
     */
    relativePosition: "tr",



...hope that helps!
erik



> Ok this is already a long post...
>
> Best Regards,
>
> Rupert
>
>
>
> On Feb 20, 2008 1:27 AM, Erik Uzureau <euzuro at gmail.com> wrote:
> > Hi Rupert,
> >
> > A big, continued, thanks! for working with these new popups. It is a
> > big help to have someone
> > trying them out.
> >
> > The reason you are having error [2] is because you actually need to
> > apply some changes to other
> > core OpenLayers classes in order to get the full functionality of the
> > new popups.
> >
> > This morning I sat down and updated the sandbox to the latest from
> > trunk and then created a new
> > patch file[a] so that you can easily get up to speed.
> >
> > You should be able to just download that patch file and apply it to
> > your version of OL with no problems.
> > Let me know if you encounter any issues, I am glad to help with this.
> >
> > Erik
> >
> >
> > [a] http://trac.openlayers.org/attachment/ticket/926/popups.patch
> >
> >
> > On Feb 19, 2008 5:58 AM, Rupert de Guzman <rndguzmanjr at gmail.com> wrote:
> > > Hi Erik,
> > >
> > > Thank you for the link of the latest version.
> > >
> > > [1] Grabbed Framed.js, FramedCloud.js, AmberCloud.js from
> > > http://dev.openlayers.org/sandbox/euzuro/pop/
> > >
> > > [2] I have to comment out lines Framed.js:#187,354 to make it work though.
> > >
> > > this.fixPadding()
> > >
> > > Regards,
> > >
> > > Rupert
> > >
> > >
> > > On Feb 19, 2008 12:02 AM, Erik Uzureau <euzuro at gmail.com> wrote:
> > > > Actually, reading it over again, it looks like you were looking at
> > > > pierre's original version of this
> > > > effort. The latest version is in my sandbox, here:
> > > >
> > > > http://dev.openlayers.org/sandbox/euzuro/pop/examples/framedPopups.html
> > > >
> > > > ...and I have replaced that iteration, so it should work correctly.
> > > >
> > > > Please do let me know if you find some problems.
> > > > Erik
> > > >
> > > >
> > > > On Feb 18, 2008 9:53 AM, Erik Uzureau <euzuro at gmail.com> wrote:
> > > > > Thanks Rupert! I'll change that right away
> > > > > erik
> > > > >
> > > > >
> > > > > On Feb 18, 2008 6:20 AM, Rupert de Guzman <rndguzmanjr at gmail.com> wrote:
> > > > > > Hi Erik,
> > > > > >
> > > > > > [1] Demo is really nice.
> > > > > >
> > > > > > [2] I downloaded
> > > > > > (http://dev.openlayers.org/sandbox/camptocamp/FramedPopups/lib/OpenLayers/Popup/FramedBubble.js
> > > > > > ) and tested but it did not work for my OpenLayers + ExtJS app. The
> > > > > > array problem bit me. Just a note to others who may encounter the same
> > > > > > issue.
> > > > > >
> > > > > > for (var i in blocks) {
> > > > > >
> > > > > > should be
> > > > > >
> > > > > > for (var i = 0; i < blocks.length; i ++){
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Rupert
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Feb 15, 2008 4:42 PM, Erik Uzureau <euzuro at gmail.com> wrote:
> > > > > > > Dear Dev and Users,
> > > > > > >
> > > > > > > I have been working the last week or so on getting a new style of
> > > > > > > openlayers popups coded and
> > > > > > > up to speed.
> > > > > > >
> > > > > > > The original version was developed and graciously contributed by the
> > > > > > > folks at CloudAmber.
> > > > > > >
> > > > > > > Two weeks ago, the good and noble Pierre Giraud took the CloudAmber
> > > > > > > code and some code
> > > > > > > worked on by the amazing people at TOPP, smooshed them together into
> > > > > > > the following demo:
> > > > > > > http://dev.openlayers.org/sandbox/camptocamp/FramedPopups/examples/framedPopups.html
> > > > > > >
> > > > > > > ...which was an amazing job and the real catalyst in this whole situation.
> > > > > > >
> > > > > > >
> > > > > > > At the TOPP coding bunker, I took this sandbox, played around with it
> > > > > > > a little bit, and came up
> > > > > > > with a design that allowed us all the functionality of the above two
> > > > > > > revisions, plus:
> > > > > > >
> > > > > > > * inherits from OpenLayers.Popup.Anchored (instead of re-implementing
> > > > > > > a ton of functions)
> > > > > > > * bubbles up the 'autoSize' and 'panIntoView' functions to the base
> > > > > > > Popup class so that everyone
> > > > > > >  can use them
> > > > > > >
> > > > > > > and finally
> > > > > > >
> > > > > > > * allows the popup to be framed in all four relative directions (tl,
> > > > > > > tr, bl, br) by merely adding some
> > > > > > >   new framing code.
> > > > > > >
> > > > > > >
> > > > > > > The last bit here is where I've reached the limits of my own
> > > > > > > knowledge. For whatever reason, I
> > > > > > > have repeatedly been unsuccessful at producing an alpha-layered image,
> > > > > > > despite valiant efforts.
> > > > > > >
> > > > > > > Therefore, my killer demo of the new, sexy popup looks like this:
> > > > > > > http://dev.openlayers.org/sandbox/euzuro/pop/examples/framedPopups.html
> > > > > > >
> > > > > > > The problem, then, is that this image:
> > > > > > > http://trac.openlayers.org/browser/sandbox/euzuro/pop/img/cloud-popup-relative.PNG
> > > > > > >
> > > > > > > is not properly alpha-ized.
> > > > > > >
> > > > > > > And so I ask your help. Is there anyone out there who could help me to
> > > > > > > re-alpha-ize the image?
> > > > > > > There will be some tricky issues with the shadows, and perhaps it
> > > > > > > would be easier to start with
> > > > > > > this original one:
> > > > > > > http://trac.openlayers.org/browser/sandbox/camptocamp/FramedPopups/img/popup.png
> > > > > > > ..and then add the three new stems yourself.
> > > > > > >
> > > > > > >
> > > > > > > Anyways, hopefully this email isn't already too long that anyone will
> > > > > > > actually read it. If you think
> > > > > > > you could help me, please drop me a line.
> > > > > > >
> > > > > > > Best,
> > > > > > > Erik
> > > > > >
> > > > > > > _______________________________________________
> > > > > > > Dev mailing list
> > > > > > > Dev at openlayers.org
> > > > > > > http://openlayers.org/mailman/listinfo/dev
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>



More information about the Dev mailing list