Warning: file_put_contents(/var/www/html/wp-content/shield/test_write_file.txt): failed to open stream: No space left on device in /var/www/html/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 421 Warning: file_put_contents(/var/www/html/wp-content/uploads/shield/test_write_file.txt): failed to open stream: No space left on device in /var/www/html/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 421 Warning: file_put_contents(/tmp/shield/test_write_file.txt): failed to open stream: No space left on device in /var/www/html/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 421 Warning: file_put_contents(/tmp/shield/test_write_file.txt): failed to open stream: No space left on device in /var/www/html/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 421 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php:421) in /var/www/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831 {"id":3887,"date":"2021-04-24T16:55:00","date_gmt":"2021-04-24T12:25:00","guid":{"rendered":"https:\/\/help.map.ir\/?post_type=manual_documentation&p=3887"},"modified":"2021-09-18T14:25:45","modified_gmt":"2021-09-18T09:55:45","slug":"reactsdk-symbollayer","status":"publish","type":"manual_documentation","link":"https:\/\/help.map.ir\/documentation\/reactsdk-docs\/reactsdk-symbollayer\/","title":{"rendered":"SymbolLayer"},"content":{"rendered":"\n
SymbolLayer is a style layer that renders icon and text labels at points or along lines on the map<\/p>\n\n\n\n
\u0642\u0627\u0628\u0644\u06cc\u062a\u200c\u0647\u0627:<\/strong><\/p>\n\n\n\n Label placement relative to its geometry.<\/p>\n point<\/strong> – The label is placed at the point where the geometry is located. Distance between two symbol anchors.<\/p>\n If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don’t have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.<\/p>\n If true, the icon will be visible even if it collides with other previously drawn symbols.<\/p>\n If true, other symbols can be visible even if they collide with the icon.<\/p>\n If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.<\/p>\n In combination with map<\/strong> – When Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by Scales the icon to fit around the associated text.<\/p>\n none<\/strong> – The icon is displayed at its intrinsic aspect ratio. Size of the additional area added to dimensions determined by Name of image in sprite to use for drawing an image background. A string with Rotates the icon clockwise.<\/p>\n Size of the additional area around the icon bounding box used for detecting symbol collisions.<\/p>\n If true, the icon may be flipped to prevent it from being rendered upsideDown.<\/p>\n Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. When combined with Part of the icon placed closest to the anchor.<\/p>\n center<\/strong> – The center of the icon is placed closest to the anchor. Orientation of icon when map is pitched.<\/p>\n map<\/strong> – The icon is aligned to the plane of the map. Orientation of text when map is pitched.<\/p>\n map<\/strong> – The text is aligned to the plane of the map.Description<\/th> Required<\/th> Default<\/th> Type<\/th> Prop<\/th><\/tr><\/thead> A string that uniquely identifies the source in the style to which it is added<\/td> false<\/td> none<\/td> string<\/td> id<\/td><\/tr> The source from which to obtain the data to style, If the source has not yet been added to the current style, the behavior is undefined<\/td> false<\/td> MapboxGL.StyleSource.DefaultSourceID<\/code><\/td>
string<\/td> sourceID<\/td><\/tr> Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style<\/td> false<\/td> none<\/td> string<\/td> sourceLayerID<\/td><\/tr> Inserts a layer above aboveLayerID<\/td> false<\/td> none<\/td> string<\/td> aboveLayerID<\/td><\/tr> Inserts a layer below belowLayerID<\/td> false<\/td> none<\/td> string<\/td> belowLayerID<\/td><\/tr> Inserts a layer below belowLayerID<\/td> false<\/td> none<\/td> number<\/td> layerIndex<\/td><\/tr> Filter only the features in the source layer that satisfy a condition that you define<\/td> false<\/td> none<\/td> array<\/td> filter<\/td><\/tr> The minimum zoom level at which the layer gets parsed and appears<\/td> false<\/td> none<\/td> number<\/td> minZoomLevel<\/td><\/tr> The maximum zoom level at which the layer gets parsed and appears<\/td> false<\/td> none<\/td> number<\/td> maxZoomLevel<\/td><\/tr> Customizable style attributes<\/td> <\/td> none<\/td> union<\/td> style<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n Styles<\/h4>\n\n\n
Name<\/h4>\n
symbolPlacement<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
point<\/code><\/p>\n
Supported Values<\/h4>\n
line<\/strong> – The label is placed along the line of the geometry. Can only be used onLineString<\/code>and
Polygon<\/code>geometries.<\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
symbolSpacing<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
number<\/code><\/p>\n
Default Value<\/h4>\n
\u06f2\u06f5\u06f0<\/code><\/p>\n
Units<\/h4>\n
pixels<\/code><\/p>\n
Minimum<\/h4>\n
\u06f1<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
symbolAvoidEdges<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
boolean<\/code><\/p>\n
Default Value<\/h4>\n
false<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconAllowOverlap<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
boolean<\/code><\/p>\n
Default Value<\/h4>\n
false<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconIgnorePlacement<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
boolean<\/code><\/p>\n
Default Value<\/h4>\n
false<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconOptional<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
boolean<\/code><\/p>\n
Default Value<\/h4>\n
false<\/code><\/p>\n
Requires<\/h4>\n
iconImage, textField<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconRotationAlignment<\/code><\/p>\n
Description<\/h4>\n
symbolPlacement<\/code>, determines the rotation behavior of icons.<\/p>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
auto<\/code><\/p>\n
Supported Values<\/h4>\n
symbol-placement<\/code>is set to
point<\/code>, aligns icons east-west. When
symbol-placement<\/code>is set to
line<\/code>, aligns icon x-axes with the line.
viewport<\/strong> – Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value ofsymbol-placement<\/code>.
auto<\/strong> – Whensymbol-placement<\/code>is set to
point<\/code>, this is equivalent to
viewport<\/code>. When
symbol-placement<\/code>is set to
line<\/code>, this is equivalent to
map<\/code>.<\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconSize<\/code><\/p>\n
Description<\/h4>\n
iconSize<\/code>. \u06f1 is the original size; 3 triples the size of the image.<\/p>\n
Type<\/h4>\n
number<\/code><\/p>\n
Default Value<\/h4>\n
\u06f1<\/code><\/p>\n
Units<\/h4>\n
factor of the original icon size<\/code><\/p>\n
Minimum<\/h4>\n
\u06f0<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera, source, composite<\/code><\/p>\n
\nName<\/h4>\n
iconTextFit<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
none<\/code><\/p>\n
Supported Values<\/h4>\n
width<\/strong> – The icon is scaled in the x-dimension to fit the width of the text.
height<\/strong> – The icon is scaled in the y-dimension to fit the height of the text.
both<\/strong> – The icon is scaled in both x- and y-dimensions.<\/p>\nRequires<\/h4>\n
iconImage, textField<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconTextFitPadding<\/code><\/p>\n
Description<\/h4>\n
iconTextFit<\/code>, in clockwise order: top, right, bottom, left.<\/p>\n
Type<\/h4>\n
array<number><\/code><\/p>\n
Default Value<\/h4>\n
[\u06f0,\u06f0,\u06f0,\u06f0]<\/code><\/p>\n
Units<\/h4>\n
pixels<\/code><\/p>\n
Requires<\/h4>\n
iconImage, textField<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconImage<\/code><\/p>\n
Description<\/h4>\n
{tokens}<\/code>replaced, referencing the data property to pull from. (
{token}<\/code>replacement is only supported for literal
iconImage<\/code>values; not for property functions.)<\/p>\n
Type<\/h4>\n
string<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera, source, composite<\/code><\/p>\n
\nName<\/h4>\n
iconRotate<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
number<\/code><\/p>\n
Default Value<\/h4>\n
\u06f0<\/code><\/p>\n
Units<\/h4>\n
degrees<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera, source, composite<\/code><\/p>\n
\nName<\/h4>\n
iconPadding<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
number<\/code><\/p>\n
Default Value<\/h4>\n
\u06f2<\/code><\/p>\n
Units<\/h4>\n
pixels<\/code><\/p>\n
Minimum<\/h4>\n
\u06f0<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconKeepUpright<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
boolean<\/code><\/p>\n
Default Value<\/h4>\n
false<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
iconOffset<\/code><\/p>\n
Description<\/h4>\n
iconRotate<\/code>the offset will be as if the rotated direction was up.<\/p>\n
Type<\/h4>\n
array<number><\/code><\/p>\n
Default Value<\/h4>\n
[\u06f0,\u06f0]<\/code><\/p>\n
Units<\/h4>\n
pixels multiplied by the value of "icon-size"<\/code><\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera, source, composite<\/code><\/p>\n
\nName<\/h4>\n
iconAnchor<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
center<\/code><\/p>\n
Supported Values<\/h4>\n
left<\/strong> – The left side of the icon is placed closest to the anchor.
right<\/strong> – The right side of the icon is placed closest to the anchor.
top<\/strong> – The top of the icon is placed closest to the anchor.
bottom<\/strong> – The bottom of the icon is placed closest to the anchor.
top-left<\/strong> – The top left corner of the icon is placed closest to the anchor.
top-right<\/strong> – The top right corner of the icon is placed closest to the anchor.
bottom-left<\/strong> – The bottom left corner of the icon is placed closest to the anchor.
bottom-right<\/strong> – The bottom right corner of the icon is placed closest to the anchor.<\/p>\nRequires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera, source, composite<\/code><\/p>\n
\nName<\/h4>\n
iconPitchAlignment<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
auto<\/code><\/p>\n
Supported Values<\/h4>\n
viewport<\/strong> – The icon is aligned to the plane of the viewport.
auto<\/strong> – Automatically matches the value oficon-rotation-alignment<\/code>.<\/p>\n
Requires<\/h4>\n
iconImage<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n
\nName<\/h4>\n
textPitchAlignment<\/code><\/p>\n
Description<\/h4>\n
Type<\/h4>\n
enum<\/code><\/p>\n
Default Value<\/h4>\n
auto<\/code><\/p>\n
Supported Values<\/h4>\n
viewport<\/strong> – The text is aligned to the plane of the viewport.
auto<\/strong> – Automatically matches the value oftext-rotation-alignment<\/code>.<\/p>\n
Requires<\/h4>\n
textField<\/code><\/p>\n
Supported Style Functions<\/h4>\n
camera<\/code><\/p>\n