Skip to content

gmapMarkers error on MapView plugin example in the DS Store #2

Open

Description

@GT-CBG

Hi there, I believe there is an error in the MapView plugin example in the DS Store.

The error is in the file _Map.html inside the function AddMarker()

Every time that a marker is added to a map, the code is supposed to add the new marker to an array called ‘gmapMarkers’. Because of the error this never happens.

Current code:

if(gmap) {
	var marker = new google.maps.Marker(markerOptions);
	marker.setMap(gmap);
	marker.addListener("click", function() { onClickMarker(this); });
}
else gmapMarkers.push(markerOptions); 

Correct code:

if(gmap) {
	var marker = new google.maps.Marker(markerOptions);
	marker.setMap(gmap);
	marker.addListener("click", function() { onClickMarker(this); });
	gmapMarkers.push(markerOptions); 
}

Regards

Activity

  1. changed the title [-]gmapMarkers error on MapView plugin[/-] [+]gmapMarkers error on MapView plugin example in the DS Store[/+] on Jan 30, 2024
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions