Hi, I'm trying to use feature, marker and popup but cannot access the popup properties.

    var feature = new OpenLayers.Feature(markers, lonLat); 
feature.closeBox = false;
feature.popupClass = OpenLayers.Class(OpenLayers.Popup.Anchored, {
        'autoSize': true
    });
feature.data.popupContentHTML = infoWindow;

How do I get access to 'backgroundColor' for example? Thanks :)

asked 22 Mar '12, 13:05

lowfreq78's gravatar image

lowfreq78
11112
accept rate: 0%

edited 22 Mar '12, 15:50

SomeoneElse's gravatar image

SomeoneElse ♦
32.3k63333754


What do you mean by "access"?

If you want only set the value of the "backgroundColor" properties, you can simply add it with the "autosize", ie:

feature.popupClass = OpenLayers.Class(OpenLayers.Popup.Anchored, {
    'autoSize': true,'backgroundColor'='#aaccee';
});
permanent link

answered 26 Mar '12, 13:22

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×114
×71
×17
×9

question asked: 22 Mar '12, 13:05

question was seen: 5,020 times

last updated: 26 Mar '12, 13:22

powered by OSQA