I'm wondering if there is a way to take off some of the default labels on a leaflet tile base-map. For example, I'm using the leaflet "dark matter" tile-set, found here, I believe: 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png'
I'd like to only put on country labels, or city labels, in certain places. By default, the labels already seem to be set. Any way to change this? Thanks in advance!
Related
Wondering if someone can help me with what I thought was a simple Shapesheet issue.
I'd like the fill colour of a shape to change based on one of the shape data values. I thought I could do this easily:
FillForeground: If(Prop.Colour="Blue",XXX,YYY)
But this doesn't work? (Visio 2021)
I've 5 list values for the data and would like a different fill colour for each? Weirdly, I can see that the value does change based on the data selection, but the actual colour seen in on the page doesn't.
Obviously, I'm not much of a coder, just an enthusiastic meddler.
I've stuck at:
=IF(Sheet.3780!Prop.StringSection="Firsts",THEMEGUARD(MSOTINT(THEME("LineColor"),40)),THEMEGUARD(MSOTINT(THEME("AccentColor"),40)))
(The shapes to colour are within a group)
Thanks
Steve
Steve !
FillForeground: If(Prop.Colour="Blue",XXX,YYY)
But this doesn't work? (Visio 2021)
For compare strings in ShapeSheet you must use STRSAME function
Use syntax like this:
IF(STRSAME(Prop.color,"blue"),4,3)
I would like to know what are the settings capabilities on workshop charts when implementing multiple layers.
Here is an example of a chart with 2 layers (3 objects):
Among the global settings options, I would like to know:
how to have only one legend per group, instead of one per layer?
how to manage colors? Is it possible to change default?
is there any way to display dotted lines for example?
Thanks in advance
how to have only one legend per group, instead of one per layer?
Currently all the legend "flattens" all the series across all the Plot Layers and there isn't any way to change the grouping. If you really wanted to, you could use a couple metric widgets in List or Tag mode and build your own legend alongside the chart, assuming you'd made overrides for all the potential series and series segments (see below).
how to manage colors? Is it possible to change default?
Yes, you can change the color for each series on the chart. If the series has no "Segement By" config, then you can choose the color directly. If you choose to segment by some other property, then you need to add a Segment Display Override for each segment value that you want to change.
is there any way to display dotted lines for example?
You can change the style from solid to dashed in the same place that you can change the color
I have uploaded polygon shape zip file in mapbox tileset and created layer name as polygon_label but layer labels are showing duplicate inside polygon area.
So there is any way to centroid the polygon geometry or restrict to display duplicate label.
How to get label centroid of the polygon and remove duplication of the label from polygon area?
You need to create point geometries and use that as your source.
I have the same issue with a shapefile with land sections I imported. To get the outline of the land sections I added a fill type layer since the tileset contains polygon features. Then I add another layer of type symbol to be able to show the section address text field from the tileset features. I set the placement as "Point". But, the text field shows multiple places inside the polygons.
The only solution I have found is to make the labels appear along the boundries of the polygons by setting the placement as "Line". This still shows multiple labels. But, it is a bit more friendly for the user.
I'm trying to create custom markers, but add 2 map layers.
Essentially trying to combine this:
https://www.mapbox.com/mapbox-gl-js/example/custom-marker-icons/
With this:
https://www.mapbox.com/mapbox-gl-js/example/toggle-layers/
How do I specify my customized markers, but assign them to 2 layers?
Markers don't exist within the map's Style, so they don't live within Layers either. They sit on top of the map, effectively within a single "layer" (but not actually a Layer).
So if you're trying to find a way to hide or show groups of markers in a single action, you'll have to find another way to do that.
Alternatively, if you really want your markers within Layers, you should create Symbol Layers with icons, not markers.
I am using
"symbol-placement": "line",
to add text labels over polygons (countries) using a precalculated line which spans the country bounds. However, the text label automatically repeats itself which does not look good.
Example: Instead of a curved GERMANY, I get a curved unwanted repetition GERMANY GERMANY GERMANY GERMANY.
I could not find any option for that... Is there a work around?
Bonus question:
Is it possible to have the text span the full line and have the font-size dynamically set accordingly? That would be the perfect solution.
Setting symbol-spacing to a very high number (eg, 5000) should effectively achieve what you want.
Bonus question: Is it possible to have the text span the full line and have the font-size dynamically set accordingly?
No. But you could set the length of the line as a property on the feature, and use data-driven styling to set the font size from that. Data-driven styling for font-sizes is supported in Mapbox-GL-JS as of version 0.35.
You could potentially also use text-letter-spacing. That one doesnt' supoprt data-driven styling, but you could use filters to set some basic classes of letter spacing.