62 lines
1.4 KiB
R
62 lines
1.4 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/styles.R
|
|
\name{pmModifyStyle}
|
|
\alias{pmModifyStyle}
|
|
\title{Modify an Existing Style}
|
|
\usage{
|
|
pmModifyStyle(
|
|
style,
|
|
colors = NULL,
|
|
labelRules = NULL,
|
|
replace_labels = FALSE,
|
|
...
|
|
)
|
|
}
|
|
\arguments{
|
|
\item{style}{A pm_style object to modify.}
|
|
|
|
\item{colors}{Named list of color overrides (from pmColors() or manual list).}
|
|
|
|
\item{labelRules}{Optional list of label rules to replace or add.}
|
|
|
|
\item{replace_labels}{Logical. If TRUE, replaces all label rules. If FALSE,
|
|
appends new rules. Default is FALSE.}
|
|
|
|
\item{...}{Additional color overrides as named arguments.}
|
|
}
|
|
\value{
|
|
A new pm_style object with modifications applied.
|
|
}
|
|
\description{
|
|
Creates a new pm_style by modifying an existing one. Useful for tweaking
|
|
preset styles without rebuilding from scratch.
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
# Start with watercolor, change water color
|
|
my_style <- pmModifyStyle(pmStyle("watercolor"), water = "#1a3a5c")
|
|
|
|
# Add label rules to minimal style
|
|
my_style <- pmModifyStyle(
|
|
pmMinimal(),
|
|
labelRules = pmCityLabels("major-only")
|
|
)
|
|
|
|
# Multiple modifications
|
|
my_style <- pmModifyStyle(
|
|
pmStyle("muted"),
|
|
colors = pmColors(water = "#2a4a6c", park = "#c0d8c0"),
|
|
replace_labels = TRUE,
|
|
labelRules = list(
|
|
pmLabelRule("places", pmCenteredTextSymbolizer(
|
|
font = "bold 14px Arial",
|
|
fill = "#333"
|
|
))
|
|
)
|
|
)
|
|
}
|
|
|
|
}
|
|
\seealso{
|
|
\code{\link{pmStyle}}, \code{\link{pmMinimal}}
|
|
}
|