0

I am using the Google Maps plugin by Objective HTML for a site I'm working on and am curious to know if it's possible to change the styling of the map it generates?

I have been able to change the styling of a map before using Google's API, but that was just for a static marker on a map. This appears to be slightly different as a plugin so I'm unsure whether a) its possible b) where specific styling code slots in.

There's nothing special about the map, just a standard marker for a channel entry. But it'd be great to know how I can adjust the styles of different elements of the map i.e the water and land colours and how much detailed text is displayed.

2 Answers 2

3

The easiest way to customize the map tiles is to follow this example:

https://objectivehtml.com/google-maps/examples/custom-map-styles

3
  • I see you've used the styles="/assets/js/gmap-styles.js". I have made my equivalent of this file but I'm unsure of what actually goes in that file. At the moment I have the following var stylez = {styles: [{ featureType: "landscape", stylers:..... Is more than this needed?
    – Adam
    Jul 14, 2014 at 20:01
  • Scratch that, I've taken a look at the file through your site and I have it working through the demo you provided. Thanks for your help, much appreciated
    – Adam
    Jul 14, 2014 at 20:10
  • Can you tell me if MapOptions are customisable too? Such as hiding the zoom function or Map type dropdown
    – Adam
    Jul 14, 2014 at 21:09
2

So this site http://snazzymaps.com/ has a bunch of pre-made styles and the JS that goes with them, you might be able to drop their JS into the gmap-styles.js file to get some different custom looks. Just a thought.

1
  • Yes, I have seen that site. Seem to have it sorted now, just needed to pop those styles into an external file and refer to it in the styles= parameter. The styleS on there are really helpful
    – Adam
    Jul 16, 2014 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.