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

How to use Pulsator on GoogleMap Marker #20

Open
albertml opened this issue Mar 17, 2017 · 6 comments
Open

How to use Pulsator on GoogleMap Marker #20

albertml opened this issue Mar 17, 2017 · 6 comments

Comments

@albertml
Copy link

When I tried to add it in GoogleMap Marker, its not working...

Here's my code:

var myMarker.position = CLLocationCoordinate2D(latitude: myLatitude , longitude: myLongitude)
myMarker.title = "MyLocation"
myMarker.map = mapView

let pulsator = Pulsator()
pulsator.radius = 240.0
pulsator.backgroundColor = UIColor.blue.cgColor

 myMarker.layer.addSublayer(pulsator)

Theres no error when you compile but the pulsator is not seen only the marker is displayed.

@albertml albertml changed the title Pulsator on GoogleMap Marker How to use Pulsator on GoogleMap Marker Mar 17, 2017
@Ziqi-Li
Copy link

Ziqi-Li commented Mar 21, 2017

If you put your Pulsator codes in viewWillAppear, it will work. I tried viewDidLoad and it won't work on Google Maps.
I know it is a bit of weird and I will leave other people comment on this.

@p01harrycobl
Copy link

Still not working Mr. Ziki Li....
First I tried this,

override func viewWillAppear(_ animated: Bool) {

    let pulsator = Pulsator()
    pulsator.radius = 240.0
    pulsator.backgroundColor = UIColor.blue.cgColor
    myMarker.layer.addSublayer(pulsator)
}

Still didn't work... Then I tried this

override func viewWillAppear(_ animated: Bool) {
    
    // Creates a marker in the center of the map.
    myMarker.position = CLLocationCoordinate2D(latitude: myLocation.coordinate.latitude, longitude: myLocation.coordinate.longitude)
    myMarker.title = "MyLocation"
    myMarker.panoramaView = panoramaView
    myMarker.icon = GMSMarker.markerImage(with: .blue)

    let pulsator = Pulsator()
    pulsator.radius = 240.0
    pulsator.backgroundColor = UIColor.blue.cgColor
    myMarker.layer.addSublayer(pulsator)

    myMarker.map = mapView
}

But still no luck... Any more suggestion? Thanks in advance...

@sujewan
Copy link

sujewan commented May 22, 2017

@Ziqi-Li Still I also facing a same issue. Please provide the solution

@guru-teja
Copy link

Has anyone found a way to add pulsator to google maps?

@volodymyrslipak
Copy link

Anyone found a way to add pulsator to google maps?
need add pulsator to marker

@umwelt
Copy link

umwelt commented Jun 19, 2018

I did add a pulsator to gmaps
#34 (comment)

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

7 participants