SnazzyMaps on Google Maps


#1

Hi!

I’m trying to change the Google Maps skin inside my Ionic App, I used before SnazzyMaps on different web projects. However I am not able to do it inside the Ionic App.

Snazzy Maps provides a JS code:

[{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#eeeeee"}]},{"featureType":"administrative.country","elementType":"geometry","stylers":[{"lightness":"100"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"lightness":"0"},{"color":"#d0ecff"}]},{"featureType":"administrative.country","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"administrative.province","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text","stylers":[{"visibility":"simplified"},{"color":"#777777"}]},{"featureType":"administrative.locality","elementType":"labels.icon","stylers":[{"visibility":"simplified"},{"lightness":60}]},{"featureType":"administrative.neighborhood","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"administrative.land_parcel","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape.man_made","elementType":"all","stylers":[{"visibility":"simplified"},{"color":"#f5f5f5"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#fafafa"}]},{"featureType":"landscape.natural","elementType":"labels","stylers":[{"visibility":"simplified"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi.attraction","elementType":"geometry","stylers":[{"color":"#e2e8cf"}]},{"featureType":"poi.business","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"poi.business","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi.medical","elementType":"all","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#ecf4d7"}]},{"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi.place_of_worship","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi.school","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi.sports_complex","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#e5e5e5"},{"visibility":"simplified"}]},{"featureType":"road.highway","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#eeeeee"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.local","elementType":"geometry.stroke","stylers":[{"visibility":"on"},{"color":"#eeeeee"}]},{"featureType":"road.local","elementType":"labels","stylers":[{"visibility":"simplified"}]},{"featureType":"road.local","elementType":"labels.text","stylers":[{"color":"#777777"}]},{"featureType":"road.local","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"transit.line","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit.station","elementType":"geometry.fill","stylers":[{"color":"#eeeeee"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#d0ecff"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]}]

Where should I put this code in order to work?
I tried on index.html, on the specific view and as well on the controller of the view, but it doesn’t work.

Any ideas?

Thanks a lot!!

Gonzalo