Modify

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#18213 closed defect (fixed)

Is "repeat-image-opacity" working

Reported by: Allroads Owned by: team
Priority: normal Milestone: 20.06
Component: Core mappaint Version: tested
Keywords: image opacity mapcss Cc:

Description (last modified by Allroads)

Hello,

I was trying.

"repeat-image-opacity"

It does not seams to work, is this correct?

Reading, searching about it, I think it is a bug.

/* SIDEWALK on footway, highway EXTENDED*/
way|z18-["footway"="sidewalk"]::footway_sidewalk_layer {
    repeat-image: sidewalk-footway.svg;
    repeat-image-phase: -50;
    repeat-image-align: center;
    repeat-image-offset: 0;
    repeat-image-height: 800;
    repeat-image-spacing: 600;
    repeat_image_opacity: 0.5;
}


Mentioned here:
10238

Mentioned here Line Element
Fields inherited from interface org.openstreetmap.josm.gui.mappaint.StyleKeys

Mentioned as constant Field values

Example:

I must tweak this image on every zoomlevel,it is too big and it must be a hint on the footway. Also on the highway road. For the whole set of images. Therefor I need prop "repeat-image-opacity"

Opacity tweaking inside mapcss is easier, then make new images every time.

Attachments (7)

repeatopacity.JPG (83.1 KB ) - added by Allroads 5 years ago.
repeatopacity2.JPG (84.8 KB ) - added by Allroads 5 years ago.
sidewalk-footway.svg (386 bytes ) - added by Allroads 5 years ago.
sidewalk-footway-text.svg (624 bytes ) - added by Allroads 5 years ago.
moveoverwayline.png (197.9 KB ) - added by Allroads 5 years ago.
noselectwayline.png (195.8 KB ) - added by Allroads 5 years ago.
selectwayline.png (190.1 KB ) - added by Allroads 5 years ago.

Download all attachments as: .zip

Change History (16)

by Allroads, 5 years ago

Attachment: repeatopacity.JPG added

comment:1 by Allroads, 5 years ago

Description: modified (diff)

in reply to:  description comment:2 by Don-vip, 5 years ago

Owner: changed from team to Allroads
Status: newneedinfo

Replying to Allroads:

I was trying.

"repeat-image-opacity"

/* SIDEWALK on footway, highway EXTENDED*/
way|z18-["footway"="sidewalk"]::footway_sidewalk_layer {
    repeat-image: sidewalk-footway.svg;
    repeat-image-phase: -50;
    repeat-image-align: center;
    repeat-image-offset: 0;
    repeat-image-height: 800;
    repeat-image-spacing: 600;
    repeat_image_opacity: 0.5;
}

You typed repeat_image_opacity with underscores instead of dashes, did you try with dashes?

comment:3 by Allroads, 5 years ago

Ofcourse this must be repeat-image-opacity
Me the ......

Because I need to tweak on every zoomlevel.
I was working on it, changed my .mapcss

I changed it unconsciously. In this style I did it with dashes.
Why images on line, when selecting line only the line get selected highlight color.
First I did it with none repeat-image linestyle, then all are highlighted.
This can be annoying, setting new tag, with repeat-image it is directly visibele.

Now only the key gets underscore.
'way|z18- { way_footwaysidewalk_repeat_image_opacity: 0.5}'
This is not working.

Strange 'repeat-image-spacing' is also not working.

/******************/
/* EXTENDED */
/* FOOT sidewalk  WAY image version */
/******************/
/*----------------*/
/* All zoomlevels, the same value */
/*----------------*/
/******************/
/* EXTENDED */
/* PARAMETER default sidewalk for footway */
/******************/
way|z18-  { way_footwaysidewalk_repeat_image_phase: 0} /* start positie 1 image */
way|z18-  { way_footwaysidewalk_repeat_image_align: center}
way|z18-  { way_footwaysidewalk_repeat_image_offset: 0}
way|z18-  { way_footwaysidewalk_repeat_image_opacity: 0.5}

/******************/
/* EXTENDED */
/* PARAMETER default TEXT sidewalk for footway */
/******************/
way|z26-  { way_footwaysidewalk_text_repeat_image_phase: 0} /* start positie 1 image */
way|z26-  { way_footwaysidewalk_text_repeat_image_align: center}
way|z26-  { way_footwaysidewalk_text_repeat_image_offset: 0}
way|z26-  { way_footwaysidewalk_text_repeat_image_opacity: 0.5}

/*----------------*/
/* Zoomlevels, different value */
/*----------------*/
/******************/
/* EXTENDED */
/* PARAMETER default sidewalk for footway */
/******************/
way|z18  { way_footwaysidewalk_repeat_image_height: 10; way_footwaysidewalk_repeat_image_spacing: 400}
way|z19  { way_footwaysidewalk_repeat_image_height: 10; way_footwaysidewalk_repeat_image_spacing: 400}
way|z20  { way_footwaysidewalk_repeat_image_height: 13; way_footwaysidewalk_repeat_image_spacing: 400}
way|z21  { way_footwaysidewalk_repeat_image_height: 20; way_footwaysidewalk_repeat_image_spacing: 600}
way|z22  { way_footwaysidewalk_repeat_image_height: 40; way_footwaysidewalk_repeat_image_spacing: 400}
way|z23  { way_footwaysidewalk_repeat_image_height: 80; way_footwaysidewalk_repeat_image_spacing: 500}
way|z24  { way_footwaysidewalk_repeat_image_height: 180; way_footwaysidewalk_repeat_image_spacing: 900}
way|z25  { way_footwaysidewalk_repeat_image_height: 350; way_footwaysidewalk_repeat_image_spacing: 2000}
way|z26- { way_footwaysidewalk_repeat_image_height: 500; way_footwaysidewalk_repeat_image_spacing: 1500}

/******************/
/* EXTENDED */
/* PARAMETER default sidewalk TEXT for highway road */
/******************/
way|z26- { way_footwaysidewalk_text_repeat_image_height: 1000; way_footwaysidewalk_text_repeat_image_spacing: 1000}


/* SIDEWALK on footway EXTENDED highway EXTENDED*/
way|z18-["footway"="sidewalk"]::footway_sidewalk_layer {
    repeat-image: sidewalk-footway.svg;
    repeat-image-phase: prop("way_footwaysidewalk_repeat_image_phase", "default");
    repeat-image-align: prop("way_footwaysidewalk_repeat_image_align", "default");      
    repeat-image-offset: prop("way_footwaysidewalk_repeat_image_offset", "default");
    repeat-image-spacing: prop("way_footwaysidewalk_repeat_image_spacing", "default");
    repeat-image-height: prop("way_footwaysidewalk_repeat_image_height", "default");
    repeat-image-opacity: prop("way_footwaysidewalk_repeat_image_opacity", "default");  
}

/* TEXT SIDEWALK on footway EXTENDED highway EXTENDED*/
way|z26-["footway"="sidewalk"]::footway_sidewalk_text_layer {
    repeat-image: sidewalk-footway-text.svg;
    repeat-image-phase: prop("way_footwaysidewalk_text_repeat_image_phase", "default");
    repeat-image-align: prop("way_footwaysidewalk_text_repeat_image_align", "default");
    repeat-image-offset: prop("way_footwaysidewalk_text_repeat_image_offset", "default");
    repeat-image-height: prop("way_footwaysidewalk_text_repeat_image_height", "default");
    repeat-image-spacing: prop("way_footwaysidewalk_text_repeat_image_spacing", "default");
    repeat-image-opacity: prop("way_footwaysidewalk_text_repeat_image_opacity", "default");             
}


Last edited 5 years ago by Allroads (previous) (diff)

by Allroads, 5 years ago

Attachment: repeatopacity2.JPG added

by Allroads, 5 years ago

Attachment: sidewalk-footway.svg added

by Allroads, 5 years ago

Attachment: sidewalk-footway-text.svg added

comment:4 by anonymous, 5 years ago

What I want to achieve.

Here both renderstyles are visualised, wayline with not a image use and with repeat-image use.
I want the repeat-image use to be visualised as the not image use, ( thin green line with opacity.)
Now repeat-image is too much present, should be a "hint", that there is a sidewalk footway.


Why:
When moved over we get the big width red opacity visualisation.
This is overwhelming in the screen. I do not like that, the base wayline should be highlighted.

Move over image

A another point is when a wayline is selected.
The not image visualisation get red also, when set different footway=* it is not visible what is set, the selection (red) overtake the visualisation of the different value. After unselecting it appears. I want to see when the edit is confirmed to see the visualisation, not till deselecting. Faster control hint, that you set the right tag.

Select wayline image

That is why I choose for repeat-image use, but tags as "opacity" does not seems to work for the image.

(sorry was not logged in)

Last edited 5 years ago by Allroads (previous) (diff)

by Allroads, 5 years ago

Attachment: moveoverwayline.png added

by Allroads, 5 years ago

Attachment: noselectwayline.png added

by Allroads, 5 years ago

Attachment: selectwayline.png added

comment:5 by Allroads, 5 years ago

Earlier mentioned Spacing problem solved! (code failure)

comment:6 by Allroads, 5 years ago

Owner: changed from Allroads to team
Status: needinfonew

The basic question is should repeat-image-opacity work?

If so, could this bug be solved?

I like to use it for more images!
Because of the above explained visualisation problem.

Last edited 5 years ago by Allroads (previous) (diff)

comment:7 by simon04, 4 years ago

Resolution: fixed
Status: newclosed

In 16700/josm:

fix #18213 - MapCSS: add support for repeat-image-opacity

comment:8 by simon04, 4 years ago

Keywords: mapcss added
Milestone: 20.06

comment:9 by Allroads, 4 years ago

Thanks !!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.