Page 1 of 1

Show LAYER on PAGE LOAD event

Posted: Thu Sep 17, 2015 10:51 am
by Luis Miguel Gutierrez Carril

I need show a layer when page full screen map is loaded. I do not want to click a button to display this layer.

The custom markers correctly show in the map when the page load.
Image

PAGE > event LOAD > Run javascript

[quote:]var map = Appery("googlemap_general").gmap;
var sfLatlng = new google.maps.LatLng(43.361591, -5.056191);
var marker = new google.maps.Marker({
position: sfLatlng,
map: map,


title: "LLEGADA",
icon: "https://sites.google.com/site/mapasllanes2015/mapas/metaL.png";
});
Appery("googlemap_labra").options.mapElement.gmap('addMarker',marker);
Appery("googlemap_labra").options.mapElement.gmap("refresh");[/quote]This works correctly... but I can not get to show layer code on page load.

What code I should run for the layer is displayed when the page load?

Thanks.


Show LAYER on PAGE LOAD event

Posted: Thu Sep 17, 2015 11:22 am
by Serhii Kulibaba

Hello,

I am sorry, not sure I understand you correctly. Please specify your question. Do you need to show google map layer? Please look this documentation: https://developers.google.com/maps/do...


Show LAYER on PAGE LOAD event

Posted: Thu Sep 17, 2015 11:49 am
by Luis Miguel Gutierrez Carril

I want show layer when the page load without click on any button.

The code of Google documentation works on CLICK event but not on LOAD event


Show LAYER on PAGE LOAD event

Posted: Thu Sep 17, 2015 11:58 am
by Luis Miguel Gutierrez Carril

I need show this when de page load
Image


Show LAYER on PAGE LOAD event

Posted: Fri Sep 18, 2015 10:18 am
by Serhii Kulibaba

Just move this code to the "page show" event. Also add timeout about 1 sec for that function