ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Exclude places from map #346

Closed almaz1213 closed 3 years ago

almaz1213 commented 3 years ago

Current behavior: I init map with camera option only. But it shows place markers.

Expected behavior: I would like see my markers only.

How to exclude plase markers from the map? I couldn't find the option in docs.

almaz1213 commented 3 years ago

option

styles: [
        {
          "featureType": "poi",
          "elementType": "all",
          "stylers": [
            { "visibility": "off" }
          ]
        }
      ]

doesn't remove them

wf9a5m75 commented 3 years ago

Please try here

https://mapstyle.withgoogle.com/

This plugin just passes the parameters to the maps sdk

almaz1213 commented 3 years ago

but where can i include mapId then?

wf9a5m75 commented 3 years ago

choose "old style wizard"

almaz1213 commented 3 years ago

do u mean retro style?

already. but enyway i need put the mapId according gmap js docs. in ur docs i cant see where can i set the mapId

wf9a5m75 commented 3 years ago

This plugin doesn't support the cloud maps, and this plugin doesn't use Google Maps JavaScript v3 API on Android and iOS.

You need to generate JSON, and pass it to the maps plugin

almaz1213 commented 3 years ago

mate a option 'styles' doesnt affect as well.

this.map = GoogleMaps.create('map_canvas', {

      camera: {
        target: {
          lat: this.lat,
          lng: this.lon
        },
        zoom: 13,
        tilt: 30
      },
      controls: {
        compass: false,
        myLocationButton: true,
        myLocation: true,   // (blue dot)
        indoorPicker: true,
        zoom: false,          // android only
        mapToolbar: false     // android only
      },

      styles: [
        {
          "featureType": "poi",
          "elementType": "all",
          "stylers": [
            { "visibility": "off" }
          ]
        }
      ],...
wf9a5m75 commented 3 years ago

Please try many options. As I said, this plugin just passes the parameters to the Google Maps SDK. You need to figure out which options are good.

almaz1213 commented 3 years ago

))) do u mean do that brutely?

wf9a5m75 commented 3 years ago

If you use Google Maps SDK directly, you will face this problem. Because this is the problem of inside the Google Maps SDK, not this plugin.

And this is not a help forum. The issue tracker for the maps plugin.

You can specify different rules. Try and try please

almaz1213 commented 3 years ago

got it. thanx mate