New map styling is coming soon to Google Maps Platform. This update to map styling includes a new default color palette and improvements to map experiences and usability. All map styles will be automatically updated in March 2025. For more information on availability and how to opt in earlier, see
New map style for Google Maps Platform
.
GMSSpriteStyle Class Reference
Stay organized with collections
Save and categorize content based on your preferences.
Overview
Describes the drawing style for a stamp image over a
GMSStyleSpan
.
- Note:
- Only supports transparent background. If any color is set to the
GMSStyleSpan
it will only be treated as a fallback.
-
Use of
GMSSpriteStyle
requires Metal rendering framework. See
setMetalRendererEnabled: (GMSServices)
to learn how to enable Metal. If
GMSStyleSpan
is added to a map without Metal being enabled, the stamp will not render and instead the polyline span will attempt to fallback to any set color. If no color is set, it will fallback to the default polyline color, [UIColor blueColor].
-
Use
GMSMapView::mapCapabilities
property to query if a
GMSMapView
supports
GMSSpriteStyle
.
Inherits
GMSStampStyle
.
Public Member Functions
|
(instancetype)
| -
initWithImage:
|
| Returns an initialized sprite stamp style with the given image.
|
Static Public Member Functions
|
(instancetype)
| +
spriteStyleWithImage:
|
| Returns a sprite stamp style with the given image.
|
Properties
|
UIImage *
| stampImage
|
| The image or texture that will repeated over a stroke.
|
Member Function Documentation
Returns a sprite stamp style with the given image.
- Parameters:
-
image
| A
UIImage
object to use as the stamp image.
|
- Returns:
- An initialized sprite stamp style.
Returns an initialized sprite stamp style with the given image.
- Parameters:
-
image
| A
UIImage
object to use as the stamp image.
|
- Returns:
- An initialized sprite stamp style.
Property Documentation
The image or texture that will repeated over a stroke.
Note that this image will be compressed into a square - so for best results have a square image. The rendered stamps will be the width of the line that the
GMSStrokeStyle
is set on. The image will be oriented with the top of the image towards the start point, and the bottom of the image towards the end point. For example, if the underlying line has two points and the start point is directly above the endpoint, the stamp will appear in an upright orientation.
Except as otherwise noted, the content of this page is licensed under the
Creative Commons Attribution 4.0 License
, and code samples are licensed under the
Apache 2.0 License
. For details, see the
Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-01 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]