Cordova-plugin-googlemaps: Reposition mylocation button

Created on 28 Mar 2018  路  5Comments  路  Source: mapsplugin/cordova-plugin-googlemaps

I'm submitting a ... (check one with "x")

  • [x] question
  • [ ] any problem or bug report
  • [ ] feature request

If you choose 'problem or bug report', please select OS: (check one with "x")

  • [ ] Android
  • [x] iOS -> iPhone X only

Current behavior:
In my iPhone X the location button is just bearly not clickable (we have stretched the app over the full screen) and the button is rendered in the unclickable area of the iPhone screen.

Is there a way i can move the button to a better/different position?

thanks in advance

question

Most helpful comment

I guess @TimothyFehr wants to just move the mylocation button to where he wants.
In that case, you need to create a button using html element.
This is the best way.

All 5 comments

Hi @TimothyFehr, I use the padding option of the map to do this in Android. I do not know if this works in IOS. The map padding pushes in the Google logo at the bottom, the compass, and the myLocationButton. I use this to push the compass and button down from the top of the screen.

        map.setOptions({
              'preferences' : {
                   'padding' : {
                        'left':0,
                        'top':25,
                        'bottom':0,
                        'right':0
                  }
              }
          });

The my location button comes from native side, not this plugin. Thus, we can't move it.

I guess @TimothyFehr wants to just move the mylocation button to where he wants.
In that case, you need to create a button using html element.
This is the best way.

ping @TimothyFehr

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christoph-puppe picture christoph-puppe  路  5Comments

lakano picture lakano  路  4Comments

Tong2203 picture Tong2203  路  5Comments

ebellempire picture ebellempire  路  3Comments

splitice picture splitice  路  5Comments