Last active
August 29, 2015 14:22
-
-
Save remyperona/e15d189bcf7cf444b413 to your computer and use it in GitHub Desktop.
geo-mashup-custom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeoMashup.addAction( 'loadedMap', function( properties, map ) { | |
var gmap = map.getMap(); | |
var styles = [ | |
{ | |
"featureType": "water", | |
"elementType": "geometry.fill", | |
"stylers": [ | |
{ "color": "#8eade4" } | |
] | |
},{ | |
"featureType": "road", | |
"elementType": "labels", | |
"stylers": [ | |
{ "visibility": "off" } | |
] | |
},{ | |
"featureType": "road", | |
"elementType": "geometry", | |
"stylers": [ | |
{ "visibility": "off" }, | |
{ "color": "#b38683" } | |
] | |
},{ | |
"featureType": "landscape.natural.terrain", | |
"stylers": [ | |
{ "visibility": "off" } | |
] | |
},{ | |
"featureType": "landscape.man_made", | |
"stylers": [ | |
{ "visibility": "off" } | |
] | |
},{ | |
"featureType": "administrative.locality", | |
"elementType": "labels", | |
"stylers": [ | |
{ "visibility": "simplified" }, | |
{ "color": "#4e2728" } | |
] | |
},{ | |
"featureType": "administrative.province", | |
"elementType": "labels", | |
"stylers": [ | |
{ "color": "#a5392c" }, | |
{ "visibility": "simplified" } | |
] | |
},{ | |
"featureType": "landscape.natural", | |
"elementType": "geometry", | |
"stylers": [ | |
{ "color": "#ffffff" } | |
] | |
} | |
]; | |
gmap.setOptions({ | |
styles: styles | |
}); | |
} ); | |
(function() { | |
GeoMashup.addAction( 'colorIcon', function( properties, icon, color_name ) { | |
// For single category icons use the Geo Mashup color icon names, | |
// but the 24x24 ones in the custom image directory | |
icon.image = properties.custom_url_path + '/images/mm_58_' + color_name + '.png'; | |
icon.iconSize = [ 58, 58 ]; | |
icon.iconAnchor = [ 29, 59 ]; | |
icon.iconInfoWindowAnchor = [ 29, 1 ]; | |
} ); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment