Integration gmap3 JS plugin with gpxviewer/loadgpx module? How to get 'map' object from gmap3?

StackOverflow https://stackoverflow.com/questions/14848717

  •  09-03-2022
  •  | 
  •  

Вопрос

I am trying to integrate gmap3 JS plugin

http://gmap3.net/

with the gpxviewer module

https://github.com/peplin/gpxviewer

The gpxviewer documentation uses

var map = new google.maps.Map(document.getElementById("map"),
    mapOptions);
loadGPXFileIntoGoogleMap(map, "pocotrail.xml");

for creating the map however gmap3 uses the following code generating the map

$("#test").gmap3();

So how do I get the real map object from gmap3 for passing it to loadGPXFileIntoGoogleMap() ?

Это было полезно?

Решение

It would do the trick:

var map = $("#test").gmap3("get");
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top