Sha256: ce7ccf233176f11ca2ab53fdc651a6e63faec0a97cc6da8c3a2352576eec83b9
Contents?: true
Size: 975 Bytes
Versions: 1
Compression:
Stored size: 975 Bytes
Contents
mapboxgl.accessToken = 'pk.eyJ1IjoiYXJ0dGVtcGxhdGUiLCJhIjoiY2s0M3I5ZHgzMGEzNDNucXM1cDd0dzl3cSJ9.a2wjLlxz8LzWj9nIoGsshw'; var map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/dark-v10', center: [-97.733330,30.266666], // starting position zoom: 13 // starting zoom }); map.on('load', function () { map.resize(); $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function(){ map.resize(); }); }); // create the popup var popup = new mapboxgl.Popup({ offset: 40 }).setText( 'Austin, Texas, 4-in-1 Telecommunications' ); // create DOM element for the marker var el = document.createElement('div'); el.id = 'marker'; // create the marker new mapboxgl.Marker(el) .setLngLat([-97.733330,30.266666]) .setPopup(popup) // sets a popup on this marker .addTo(map); // Add zoom and rotation controls to the map. map.addControl(new mapboxgl.NavigationControl(), 'bottom-right');
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
CV-Portfolio-0.0.1 | assets/js/mapbox.init.js |