[OpenLayers-Users] Text layer and pop ups
Abhi
abhirama.bhat at gmail.com
Mon Nov 17 01:12:40 EST 2008
I resolved this by using a global boolean variable. In my select
onFeatureSelect method I set this variable to true and in onFeatureUnselect
I set this to false. In my click handler method I check as to whether the
variable is true. If so I do not create a marker and if not I do create a
marker. This solution solves my problem but it looks like a hack to me. Is
there a more elegent way to achieve this?
On Sun, Nov 16, 2008 at 1:58 PM, Abhi <abhirama.bhat at gmail.com> wrote:
> Thanks for that Christopher. I am using GML layer now and I have a cool pop
> up :). Now I have a problem which was not present when using a text layer.
>
> What I want to achieve is, I have a map in which I am showing some icons
> (using GML layer). If the user clicks on these icons a pop up opens in which
> an image is shown. But if the user click on some other place in the map a
> marker needs to be placed there (But the marker should not be placed if the
> user clicks on the icons). So I am using a marker layer as well in my map.
> Now the trouble is once the user clicks on my icons the pop up opens but a
> marker is placed as well. I want to stop the event once the user clicks on
> the icons so that the markers are not created. This scenario was not present
> when I was using the text layer.
>
> How do I prevent the markers from getting placed when the user clicks on
> the icons?
>
> On Sat, Nov 15, 2008 at 4:13 PM, Christopher Schmidt <
> crschmidt at metacarta.com> wrote:
>
>> On Sat, Nov 15, 2008 at 03:37:24PM +0530, Abhi wrote:
>> > I have a text layer and when I click on the corresponding markers a pop
>> up
>> > opens in which I display an image. The pop up that opens now is the
>> default
>> > pop up which is pretty small, not very aesthetically pleasing and has no
>> > close button.
>> >
>> > I went through the different popup examples given here
>> > http://dev.openlayers.org/sandbox/euzuro/pop/examples/popupMatrix.html.
>> >
>> > How do I over ride the default pop up (which text layer uses) and give
>> one
>> > of the pop ups from the above page?
>>
>> http://openlayers.org/pipermail/users/2008-April/005694.html
>>
>> Regards,
>> --
>> Christopher Schmidt
>> MetaCarta
>>
>
>
>
> --
> Cheers,
> Abhi
>
--
Cheers,
Abhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081117/71e2fd4c/attachment.html
More information about the Users
mailing list