Skip to content

L.userMarker #7

Description

@TylerGriffin99

Hi Heyman,

I am looking at your code and trying to implement a part of it in React:
var marker = null;
pestMap.on("locationfound", function(location) {
if (!marker) {marker = L.userMarker(location.latlng, {pulsing:true}).addTo(pestMap)}
marker.setLatLng(location.latlng);
marker.setAccuracy(location.accuracy);
});
pestMap.locate({
watch: false,
locate: true,
setView: true,
enableHighAccuracy: true
});

The error I keep getting is: L.userMarker is not a function. have you experienced this before by any chance?

Any help is much appreciated.

Tyler

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions