skmaps – 如何自定义位置图标?

我试图用我自己的替换演示中的位置图标,但我还没弄清楚如何.

我在.json文件中搜索它的声明并没有成功.

{
        "class" : "map",
        "colortype" : "rgba",
        "columns" : 1,
        "filename" : 
        [
            "route_arrow.png",
            "route_arrow.png",
            "route_arrow.png",
            "route_arrow.png",
            "route_arrow.png",
            "route_arrow.png"
        ],
        "rows" : 1,
        "textureatlas" : 
        [

            {
                "textureheight" : [ 128, 128, 128, 128, 128, 128 ],
                "textureid" : 55,
                "texturelinear" : true,
                "texturelocation" : [ 0, 0 ],
                "texturename" : "route_arrow",
                "texturewidth" : [ 128, 128, 128,128, 128, 128 ]
            }
        ]
    },

最佳答案 该位置的图标可在应用程序SKMapsResources – >中找到. SKMaps.bundle-> MapResources->共同.有许多图标用于:

以下是所有实例:

-ccp_2d,
ccp_2d @ 2倍,
ccp_2d @ 3倍,
ccpmedium_2d,
ccpmedium_2d @ 2倍,
ccpmedium_2d @ 3倍,
ccpsmall_2d,
ccpsmall_2d @ 2倍,
ccpsmall_2d @ 3x,这些图标构成了2D视图的资源.

-ccp_3d,
ccp_3d @ 2倍,
ccp_3d @ 3x,这些图标构成了3D视图的资源.

要更改位置图标,您必须将这些png替换为您想要的那些.
确保所有新图标的大小完全相同(像素密度相同,例如:32×32,64×64等)作为原始图标,并且它们的颜色仅为RGB.

点赞