Adding Custom Map Styles to jQuery Store Locator Plugin -


i'm working on store locator client site uses jquery store locator plugin (https://github.com/bjorn2404/jquery-store-locator-plugin).

i'm trying incorporate custom map styles:

stylers: [     { 'saturation': '-62' },     { 'gamma': '0.5' }   ] 

i thought put them mapsettings parameter, they're not being recognized. i've tried every bracket variation can think of, no avail.

i'm thinking need go jquery.storelocator.js, , add there, i'm having trouble finding put (if that's best solution).

any ideas?

update here code have tried implement it:

<script> $(function() {     $('#map-container').storelocator({         'datatype': 'json',         'datalocation': '/data/locations.php',         'slidemap' : true,         'mapsettings' : { zoom : 12, maptypeid: google.maps.maptypeid.roadmap, stylers : [{'saturation' :'-62'}] }     }); }); </script> 

the answer turned out syntax issue, after all. mapsettings property passed mapoptions class, , requires both styles and stylers parameters:

'mapsettings' : { zoom : 12, maptypeid: google.maps.maptypeid.roadmap, styles : [{stylers: [{'saturation' :'-62'}]}] } 

inside styles bracket, can add many custom settings like, long use stylers parameter well:

'mapsettings' : { zoom : 12, maptypeid: google.maps.maptypeid.roadmap, styles : [             {                 "featuretype": "landscape",                 "stylers": [                   { "saturation": -74 },                   { "lightness": 82 },                   { "gamma": 1.18 },                   { "color": "#eleff2" }                 ]             },{                 "featuretype": "water",                 "stylers": [                   { "saturation": -49 },                   { "color": "#eleff2" },                   { "lightness": -1 },                   { "gamma": 1 }                 ]             },{                 "featuretype": "road",                 "stylers": [                   { "hue": "#0099ff" },                   { "lightness": 4 },                   { "saturation": -78 }                 ]             },{                 "featuretype": "poi",                 "stylers": [                   { "hue": "#0099ff" },                   { "saturation": -38 },                   { "lightness": 67 }                 ]               }             ] } 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -