KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using this service https://developers.google.com/maps/documentation/javascript/directions to create a route between two markers. The problem is that when I run the function to create the path, he enters me two markers by default from google maps (the beginning and end) when I had created the markers with different style. Result: at each point have my marker and the marker's default google maps above. How can I hide the marker created by google? The code I'm using is: function makePathToMarker(position1, position2) { var request = { origin: new google.maps.LatLng(myLocation.split(",")[0],myLocation.split(",")[1]), destination: new google.maps.LatLng(position1, position2), travelMode: google.maps.DirectionsTravelMode.DRIVING }; var directionsService = new google.maps.DirectionsService(); directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); }
Tags (comma-separated)
Save Edits
Cancel