Results 1 to 7 of 7

Thread: Any way to style the text colours on the badges?

  1. #1
    Etablierter skobbler
    Join Date
    14.03.2015
    Posts
    27

    Frage Any way to style the text colours on the badges?

    QUERY

    Regarding iOS SDK Version 2.4.0

    I cannot change the colours of the text on the badges (that show the road numbers) such as the trunk routes which have green badges show up black text but I want it to show white text. I've tried with Style Editor and editing the theme JSON file manually but no luck. Is there a way to do it?
    ____________

    Peyesdev
    Mapping and App Developer

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    The badges are textures – you can find them in the /MapResources folder of the StyleEditor.
    Inside that folder they are separated on “base style” specific DayStyle, NightStyle and Common – if you have a style specify texture that you want to use (e.g. change the highway badge only in grayscale) then put the texture in the specific folder (see /MapResources/GrayscaleStyle/highway_signs.png). If you want to modify the highway badge in all base styles, modify /MapResources/Common/highway_signs.png).

  3. #3
    Etablierter skobbler
    Join Date
    14.03.2015
    Posts
    27
    I wondered whether the actual text colour can be changed rather than the badges behind the text. Is that possible?
    ____________

    Peyesdev
    Mapping and App Developer

  4. #4
    Etablierter skobbler
    Join Date
    14.03.2015
    Posts
    27
    Any help on this question please?
    ____________

    Peyesdev
    Mapping and App Developer

  5. #5
    Dev platform evangelist dandronic's Avatar
    Join Date
    31.03.2014
    Posts
    177
    In the style sheet change
    Code:
    	"badges" : 
    	[
    		
    		{
    			"columns" : 2,
    			"filename" : "highway_signs.png",
    			"id" : 59,
    			"rows" : 8,
    			"textcolor" : "FFFFFF"
    		}
    	],
    to
    Code:
    	"badges" : 
    	[
    		
    		{
    			"columns" : 2,
    			"filename" : "highway_signs.png",
    			"id" : 59,
    			"rows" : 8,
    			"textcolor" : "FF0000"
    		}
    	],
    to make the highway badges have red text.
    For other badges (different road types), look for the "badge" keyword inside the style sheet and set the "textcolor" property according to your preferences

  6. #6
    Etablierter skobbler
    Join Date
    14.03.2015
    Posts
    27

    Frage

    Hello,

    Thanks for your message. The code change you suggested works fine for changing text colour on all badges. However, I want to change the black text only on the green badges to white as it will show better but no matter what I do it doesn't change. The code I'm trying to change is below:

    Code:
     1  "id": "9.7",
     2  "line": {
     3    "fill": {
     4      "width": 1
     5    }
     6  },
     7  "text": {
     8    "badge": {
     9     "badgeid": 59,
    10     "badgetype": "#0#1",
    11     "color": "000000",
    12     "fontid": [
    13       302,
    14       302,
    15       302,
    16       302
    17     ],
    18     "fontid3d": [
    19       302,
    20       302,
    21       302,
    22       302
    23     ],
    24     "format": "#1",
    25     "horizontal": true,
    26     "outlinecolor": "ffffffff",
    27     "position": "path",
    28     "spacing": 400
    29   }
    30 }
    If I change line 11 from "color": "000000" to "color": "FFFFFF" or any other colour does not work. It remains black. Any ideas what to do?

    P.S. 302 refers to a font definition with id=302 that I custom included and font appears fine.

    Thanks!
    ____________

    Peyesdev
    Mapping and App Developer

  7. #7
    Dev platform evangelist dandronic's Avatar
    Join Date
    31.03.2014
    Posts
    177
    Changing the color tag should do the trick, but it does not (we confirm this) - we're reaching out the dev team to see what the problem is.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •