question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setMyLocationButtonEnabled not available on @ionic-native/google-maps

See original GitHub issue

I’m submitting a … (check one with “x”)

  • question
  • any problem or bug report
  • feature request

If you choose ‘problem or bug report’, please select OS: (check one with “x”)

  • Android
  • iOS

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.6.0 "Google Maps SDK for iOS"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-googlemaps 2.2.5 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

Current behavior:

setMyLocationButtonEnabled instance member is not found on @ionic-native/google-maps package. I’d like to know if there’s a workaround to make the button appear, or I’ll just have to wait for you to implement it (I can also help you doing it if you guide me).

Expected behavior:

Function found and button shown, as the ionic framework documentation says.

Screen capture or video record:

error img

Related code, data or error log (please format your code or data):

The person who share your project files on Github (or other git repository) is in faster lane than other people.
Please share your project files on Github or others(Bitbucket, Gitlabs...etc).
If you don't want to share your project files, please create a demo project, then share it.

Screen captures, and/or native logs(such as Logcat, xcode logs) are appreciate.

Giving much information, you are waiting time is less.
Thank you for your cooperation.
this.map.setMyLocationButtonEnabled(true) // undefined ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
battikacommented, Mar 7, 2018

@wf9a5m75 thanks for the insight. In my opinion Google Maps is a very important part of the mobile ecosystem so Capacitor will need to support it sooner or later otherwise people will refuse using it. I’m happy with your Google Maps plugin and I don’t consider switching to anything else.

2reactions
wf9a5m75commented, Mar 7, 2018

@amsimoes You can not install the package from the git repo. You need to build the package.

The easiest solution is @battika way. Some people wants to more, they builds by themselves.

If you want to build the package, you can do like this:

$> https://github.com/ionic-team/ionic-native

$> cd ionic-native

$> npm install

// (build way #A) If you use other plugins, you need to build all of them
$> npm run build

// (build way #B) If you use only google-maps, you can build only the google-maps module
$> npm run build:core && npm run build:modules google-maps

$> cd  (your project)

$> npm link (path to)ionic-native/dist/\@ionic-native/core
$> npm link (path to)ionic-native/dist/\@ionic-native/google-maps
Read more comments on GitHub >

github_iconTop Results From Across the Web

setMyLocationButtonEnabled instance member not found in ...
I'm having an issue with the instance member of Google Maps native plugin for Ionic framework (latest version - 2.0). The instance member...
Read more >
setMyLocationButtonEnabled instance member not found in ionic ...
Issue: setMyLocationButtonEnabled not available on @ionic-native/google-maps. opened by amsimoes on 2018-03-04. I'm submitting a .
Read more >
Can't use setMyLocationButtonEnabled Android Google Maps
According to the documentation (emphasys mine):. Enables or disables the my-location button. The my-location button causes the camera to ...
Read more >
index.d.ts - UNPKG
You can not specify both property at the same time. ... CameraPosition, * MarkerOptions, * Marker * } from '@ionic-native/google-maps'; * import {...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found