apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.27k stars 382 forks source link

map_options change type doesn't work #563

Open miguelms95 opened 5 years ago

miguelms95 commented 5 years ago

Hi, i'm trying to set the map type to satellite, this is my code:

var handler = Gmaps.build('Google');
  handler.buildMap({ provider: {}, internal: {id: 'map'}, map_options: {type: 'SATELLITE'}}, function(){
    markers = handler.addMarkers([
      {
        "lat": #{@myplace.latitude},
        "lng": #{@myplace.longitude},
        "infowindow": "hi!"
      }
    ]);
    handler.bounds.extendWith(markers);
    handler.fitMapToBounds();

  });

It's not working... map_options: {type: 'SATELLITE'}.