Custom Map Styles

Home Forums MapPress Support Custom Map Styles


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #14280


    I really like your plugin, great work.

    Unfortunately, I’m having trouble with getting my styled map to show up correctly. I’ve validated the code I’m using, but still can’t get it to show up. Here’s my json:
    [{"featureType":"landscape","stylers":[{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},{"featureType":"road.highway","stylers":[{"saturation":-10},{"visibility":"simplified"}, {"hue":"#DD912C"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}]

    I titled it “main” in the settings page and selected it as default. No luck. I also tried using the shortcode for maptypeid without any luck either.

    Here is the link to the page where I’ve used the shortcode. It just shows up blank:

    Here is the main map, which should show the styles as I’ve made them default. It just shows the standard map:

    I’d greatly appreciate any help.




    The JSON you pasted above is valid, but for some reason the JSON on the page isn’t. If I paste in the code above it works fine for me (in the ‘settings’ page demo map). I did this:

    1. Went to settings
    2. In the styled maps section I pasted the code you provided above verbatim. I gave the style the name ‘test’
    3. I saved the settings
    4. I selected the new map type in the ‘map types’ section and saved again
    5. Now I was able to select map type ‘test’ in the demo map (and see the styles)

    What happens if you follow those steps?



    Thanks for your help. I followed those steps exactly and it worked. I’m puzzled as to why it didn’t before. Perhaps the default style was throwing it off.

    Much appreciated.


Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.