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.

Marker icon not changing

See original GitHub issue

Edit: Plateform Android Here i my code:

CapacitorGoogleMaps.addMarker({
        latitude: coordinates.coords.latitude,
        longitude: coordinates.coords.longitude,
        title: "My Location",
        snippet: "Custom Snippet",
        isFlat: true,
        url: "../../assets/images/blue-logo.png"
      });

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
va2ron1commented, Jan 10, 2022

This is the issue… In the definitions of the addMarker the parameter is called url, but the implementation in iOS is called iconUrl

A pull request has been added renaming the parameter

Edit: Apparently Android doesn’t have a custom icon yet. Ref

0reactions
tafelnlcommented, Mar 16, 2022

We’ve just released a (pretty stable) beta for version 2 of this plugin under the name @capacitor-community/google-maps.

It features a more complete and consistent API. Also the map can finally be rendered behind the webview in this new version.

It also adds better support for custom marker icons for the iOS platform. Android is still WIP and PRs are welcome.

Extensive documentation for v2 can be found here: https://capacitor-community.github.io/google-maps/

Since version 1 lacked a lot of (basic) features, did not have good coding practices, had a poor API and it is not recommended to use it anymore, we’ve dropped support for it. Therefore I will close this issue. We believe version 2 offers a better Developer Experience and is a much better fit for anyones use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Leaflet marker icon does not change correspondingly
I am building an ASP.NET Core application using Leaflet.js library. On the map I would like to show containers(used for transferring ...
Read more >
Marker icon not changing · Issue #201 - GitHub
I am trying to add a marker with a custom icon from the assets folder, I tried to set the url with: "assets/images/icons/location-pin.png",...
Read more >
marker icon isn't showing in Leaflet - Stack Overflow
I 've put together a very simple React / Leaflet demo but the marker icon is not showing at all. Full running code...
Read more >
Leaflet Tutorial #3: Change marker icon, add shadow - YouTube
Learn how to change a marker icon, and add shadow using Leaflet, an open-source JavaScript library. Sample code for a map viewer: ...
Read more >
I can't change the marker icon or image - WordPress.org
I cannot change the image or icon of the new marker or edit the existing one. Why doesn't it work now? Someone else...
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