kokuda / gpxviewer

Client-side Javascript GPX file viewer using Google Maps
http://notions.okuda.ca/geotagging/projects-im-working-on/gpx-viewer/
MIT License
7 stars 1 forks source link

Remove GPX #7

Closed tourenfex closed 6 years ago

tourenfex commented 7 years ago

How can I remove the gpx-overlay on mouseout-event?

kokuda commented 6 years ago

I'm not sure what you mean? Do you mean making the popups close after moving the mouse away from them? The google.maps.InfoWindow that is used can be closed by calling .close(), but I'm not sure how to decide when that should happen.

You can define a custom popup with more flexibility that can probably do what you want. See the documentation here https://developers.google.com/maps/documentation/javascript/examples/overlay-popup.

Unfortunately, support for this is not available in loadgpx.js as it is. It can be considered for future updates, however, it is most likely that the new feature would be adding support for the custom overlays as described in the link above so it is best to start there.

Feel free to publish your changes and submit a pull request.