Skip to content

Instantly share code, notes, and snippets.

@Tabrisrp
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tabrisrp/e15d189bcf7cf444b413 to your computer and use it in GitHub Desktop.
Save Tabrisrp/e15d189bcf7cf444b413 to your computer and use it in GitHub Desktop.
geo-mashup-custom
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