Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Show LAYER on PAGE LOAD event

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Show LAYER on PAGE LOAD event

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...

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Show LAYER on PAGE LOAD event

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

Luis Miguel Gutierrez Carril
Posts: 0
Joined: Thu Jul 30, 2015 9:57 pm

Show LAYER on PAGE LOAD event

I need show this when de page load
Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Show LAYER on PAGE LOAD event

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

Return to “Issues”