4

I am trying to replace the position icon in the demo with my own but I haven't managed to figure out how. I searched for it's declaration in the .json file and had no success.

{
        "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 ]
            }
        ]
    },
  • Welcome to SO! Post the code you have tried and any problems you are having with said code so that we able to help you. See the [How to ask page](http://stackoverflow.com/help/how-to-ask) for help in improving your question. – Madness Aug 21 '15 at 06:31

1 Answers1

2

The icon for the position is found in the apps SKMapsResources -> SKMaps.bundle-> MapResources-> Common. There are a number of icons that are used :

Here are all instances:

-ccp_2d, ccp_2d@2x, ccp_2d@3x, ccpmedium_2d, ccpmedium_2d@2x, ccpmedium_2d@3x, ccpsmall_2d, ccpsmall_2d@2x, ccpsmall_2d@3x, these icons form the resources for the 2D view.

-ccp_3d, ccp_3d@2x, ccp_3d@3x, these icons form the resources for the 3D view.

To change the position icon you have to replace these pngs with the ones you want. Make sure that all your new icons are exactly the same size (the same pixel density, for example: 32x32,64x64,etc) as the original and that their colours are only RGB.

Dragos T
  • 166
  • 4