File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 44 < style >
55/* required styles copied from leaflet.css for use in web-map and related
66 custom elements */
7-
7+ /* this is required by tiles which are actually divs with multiple images in them */
8+ .leaflet-tile img {
9+ position : absolute;
10+ left : 0 ;
11+ top : 0 ;
12+ }
13+
14+ /* MapML treats images like map layers, so far as fade animation is concerned */
15+ .leaflet-fade-anim .leaflet-image-layer {
16+ will-change : opacity;
17+ }
18+
19+ .leaflet-image-layer {
20+ visibility : hidden;
21+ }
22+ .leaflet-image-loaded {
23+ visibility : inherit;
24+ }
825.leaflet-pane ,
926.leaflet-tile ,
1027.leaflet-marker-icon ,
Original file line number Diff line number Diff line change 191191 } ,
192192 attached : function ( ) {
193193 this . async ( function ( ) {
194- console . log ( this . localName + '#' + this . id + ' was attached' ) ;
195194
196195 // the dimension attributes win, if they're there. A map does not
197196 // have an intrinsic size, unlike an image or video, and so must
220219 }
221220
222221 // create the Leaflet map if this is the first time attached is called
223- if ( typeof this . _map === "undefined" ) {
222+ if ( ! this . _map ) {
224223 this . _map = L . map ( this . $ . map , {
225224 center : new L . LatLng ( this . lat , this . lon ) ,
226225 projection : this . projection ,
259258 this . poster . style . display = 'none' ;
260259 }
261260 }
262- // log map dimensions. If things go wrong with setup, this may be useful
263- console . log ( "map center: " + this . _map . getCenter ( ) ) ;
264- var west = this . _map . getBounds ( ) . getWest ( ) ,
265- south = this . _map . getBounds ( ) . getSouth ( ) ,
266- east = this . _map . getBounds ( ) . getEast ( ) ,
267- north = this . _map . getBounds ( ) . getNorth ( ) ;
268-
269- if ( west === east || south === north ) {
270- console . log ( 'ERROR: BAD EXTENT' ) ;
271- }
272- console . log ( "map bounds bbox=" + this . _map . getBounds ( ) . toBBoxString ( ) ) ;
273261 this . _setUpEvents ( ) ;
274262 }
275263
You can’t perform that action at this time.
0 commit comments