kopia lustrzana https://github.com/osm2vectortiles/osm2vectortiles
				
				
				
			Disable rotator function on frontpage map
							rodzic
							
								
									2641baad2b
								
							
						
					
					
						commit
						e7643f3dff
					
				|  | @ -15,18 +15,18 @@ | |||
| <div id='map'></div> | ||||
| <script> | ||||
| 
 | ||||
| function rotator(){ | ||||
|   map.easeTo({bearing:60, duration:10000, pitch:55, zoom:18}); | ||||
|   window.setTimeout(function(){ | ||||
|     map.easeTo({bearing:180, duration:10000, pitch:0, zoom:14}); | ||||
|     window.setTimeout(function(){ | ||||
|       map.easeTo({bearing:300, duration:10000, pitch:30, zoom:16}); | ||||
|       window.setTimeout(function(){ | ||||
|         rotator() | ||||
|       }, 10000) | ||||
|     }, 10000) | ||||
|   }, 10000) | ||||
| } | ||||
| // function rotator(){ | ||||
| //   map.easeTo({bearing:60, duration:10000, pitch:55, zoom:18}); | ||||
| //   window.setTimeout(function(){ | ||||
| //     map.easeTo({bearing:180, duration:10000, pitch:0, zoom:14}); | ||||
| //     window.setTimeout(function(){ | ||||
| //       map.easeTo({bearing:300, duration:10000, pitch:30, zoom:16}); | ||||
| //       window.setTimeout(function(){ | ||||
| //         rotator() | ||||
| //       }, 10000) | ||||
| //     }, 10000) | ||||
| //   }, 10000) | ||||
| // } | ||||
| 
 | ||||
| mapboxgl.accessToken = 'pk.eyJ1IjoicGV0ZXJxbGl1IiwiYSI6ImpvZmV0UEEifQ._D4bRmVcGfJvo1wjuOpA1g'; | ||||
| if (!mapboxgl.supported()) { | ||||
|  | @ -40,12 +40,12 @@ if (!mapboxgl.supported()) { | |||
| 		zoom: 14.66 | ||||
| 	}); | ||||
| 
 | ||||
| 	map.on('load', function(){ | ||||
|     if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | ||||
|       //mobile devices are usually to weak for rendering the flyover | ||||
|       rotator() | ||||
|     } | ||||
| 	}); | ||||
| 	// map.on('load', function(){ | ||||
|  //    if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | ||||
|  //      //mobile devices are usually to weak for rendering the flyover | ||||
|  //      rotator() | ||||
|  //    } | ||||
| 	// }); | ||||
| } | ||||
| </script> | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Manuel Roth
						Manuel Roth