Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/layers-backend-order
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelars86 committed Mar 4, 2021
2 parents 13681f4 + fe988d0 commit bbba95b
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions src/js/src/jeo-map/class-jeo-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,11 @@ export default class JeoMap {
this.initMap()
.then( () => {
if ( this.getArg( 'layers' ) && this.getArg( 'layers' ).length > 0 ) {
// console.log( );
map.on( 'load', () => {
if ( this.isEmbed ) {
map.setZoom( this.getArg( 'initial_zoom' ) );
map.setCenter( [
this.getArg( 'center_lon' ),
this.getArg( 'center_lat' ),
] );
// map.flyTo( {
// center: [
// this.getArg( 'center_lon' ),
// this.getArg( 'center_lat' ),
// ],
// zoom: this.getArg( 'initial_zoom' ),
// } );
} else {
map.setZoom( this.getArg( 'initial_zoom' ) );
map.setCenter( [
this.getArg( 'center_lon' ),
this.getArg( 'center_lat' ),
] );
// map.flyTo( {
// center: [
// this.getArg( 'center_lon' ),
// this.getArg( 'center_lat' ),
// ],
// zoom: this.getArg( 'initial_zoom' ),
// } );
}
} );
map.setZoom( this.getArg( 'initial_zoom' ) );
map.setCenter( [
this.getArg( 'center_lon' ),
this.getArg( 'center_lat' ),
] );

map.addControl(
new mapboxgl.NavigationControl( { showCompass: false } ),
Expand Down

0 comments on commit bbba95b

Please sign in to comment.