You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Kabkee

Trainee

  • "Kabkee" started this thread

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

1

Thursday, September 20th 2018, 4:19am

Google Map Plugin : Access to map object and others

Hi,

Regarding to the thread : https://krpano.com/forum/wbb/index.php?page=Thread&threadID=13127


I'd like to access Google map object and directly handle it using Google map api.
After triggered 'onmapready' i can access to the map object like

Source code

1
2
var layerMap = vr.get('layer[skin_map]');
var c = layerMap.gmAPI.map.getCenter();



Even if I set the plugin's lat and lng like the below, it returns {lat:0, lng:0}

Source code

1
<layer name="skin_map" state="closed" url="%SWFPATH%/plugins/googlemaps.js" visible="true" align="lefttop" width="100%" height="100%" x="0" y="0" zorder="20" lat="37.322000" lng="127.123760" zoom="17" mapsapi="https://maps.google.co.kr" bgalpha="1" maptype="normal" onmapready="js(VrEditor.onReadyKrpanoGoogleMap());" controls="zoom" key='SENSORED" >



setCenter() method is not working as well.
It seems like layerMap.gmAPI returns another map object not embeded krpano google map.

I eventually want to change markers status and other options and handle all the other google map API interactively with krpano.

Any commens are welcomed :(


Similar threads