NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 ♦
36.9k71370866


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%

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:

×122
×98
×23
×15

question asked: 22 Mar '12, 13:05

question was seen: 6,782 times

last updated: 26 Mar '12, 13:22

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum