Modify

Opened 9 months ago

Closed 12 days ago

Last modified 11 days 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 9 months ago.
repeatopacity2.JPG (84.8 KB) - added by Allroads 9 months ago.
sidewalk-footway.svg (386 bytes) - added by Allroads 9 months ago.
sidewalk-footway-text.svg (624 bytes) - added by Allroads 9 months ago.
moveoverwayline.png (197.9 KB) - added by Allroads 9 months ago.
noselectwayline.png (195.8 KB) - added by Allroads 9 months ago.
selectwayline.png (190.1 KB) - added by Allroads 9 months ago.

Download all attachments as: .zip

Change History (16)

Changed 9 months ago by Allroads

Attachment: repeatopacity.JPG added

comment:1 Changed 9 months ago by Allroads

Description: modified (diff)

comment:2 in reply to:  description Changed 9 months ago by Don-vip

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 Changed 9 months ago by Allroads

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 9 months ago by Allroads (previous) (diff)

Changed 9 months ago by Allroads

Attachment: repeatopacity2.JPG added

Changed 9 months ago by Allroads

Attachment: sidewalk-footway.svg added

Changed 9 months ago by Allroads

Attachment: sidewalk-footway-text.svg added

comment:4 Changed 9 months ago by anonymous

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 9 months ago by Allroads (previous) (diff)

Changed 9 months ago by Allroads

Attachment: moveoverwayline.png added

Changed 9 months ago by Allroads

Attachment: noselectwayline.png added

Changed 9 months ago by Allroads

Attachment: selectwayline.png added

comment:5 Changed 9 months ago by Allroads

Earlier mentioned Spacing problem solved! (code failure)

comment:6 Changed 9 months ago by Allroads

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 9 months ago by Allroads (previous) (diff)

comment:7 Changed 12 days ago by simon04

Resolution: fixed
Status: newclosed

In 16700/josm:

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

comment:8 Changed 12 days ago by simon04

Keywords: mapcss added
Milestone: 20.06

comment:9 Changed 11 days ago by Allroads

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.