Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Marker Image #178

Open
Gianmariai opened this issue Jan 19, 2021 · 1 comment
Open

Change Marker Image #178

Gianmariai opened this issue Jan 19, 2021 · 1 comment

Comments

@Gianmariai
Copy link

Hello All,
i use gmap to track a moving target. Initially when the target is on stop, i use an image.. during movement of target i want to change the image to reflect heading of target. I cant find any way to cjhange the associated image of GMarkerGoogle after creation. Any suggest?

Regards,
Gianmaria

@DoiMayank
Copy link

you can follow these steps:
Create the Marker: When you initialize your marker, set an initial icon for the target, which could represent whether it's moving or stationary.
Update the Icon: GMap.NET allows you to change the marker's icon after it has been created. You can implement a method to switch the icon based on whether the target is moving or not.
Implement Movement Logic: In your code, listen for events that indicate the target has started moving. When this happens, call the method to update the marker's icon accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants