Interactive Portsmouth Map for Travelers | C&J Bus Lines (2024)

Buy Tickets

\n

\n ","display_title":"Portsmouth Transportation Center","gps_latitude":"43.059498","gps_longitude":"-70.803780","image":null,"title":"Portsmouth Transportation Center"},{"address":null,"category":"restaurants","coordinates":{"lat":43.061718,"lng":-70.81559},"description":"Do you enjoy dining on a golf course, either because you love golf or you love watching people golf? Then Grill 28would be for you even if they didn't have terrific food, local brews, and a surprisingly robust wine menu, all great before or after 18 holes in Portsmouth. ","description_html":"\n

\n

Grill 28 at Pease

\n

Do you enjoy dining on a golf course, either because you love golf or you love watching people golf? Then Grill 28would be for you even if they didn't have terrific food, local brews, and a surprisingly robust wine menu, all great before or after 18 holes in Portsmouth.

\n

\n ","display_title":"Grill 28 at Pease ","gps_latitude":"43.0617176","gps_longitude":"-70.8155932","image":null,"title":"Grill 28 at Pease "},{"address":null,"category":"hotels","coordinates":{"lat":43.054916,"lng":-70.774414},"description":"Comfortable, affordable lodging located just off the Portsmouth traffic circle, making it the ideal place to start your Seacoast exploration. With C&J's exclusive offer, you can get 15% off your next stay if you with us, too!","description_html":"\n

\n

Fairfield Inn by Marriott Portsmouth Seacoast

\n

Comfortable, affordable lodging located just off the Portsmouth traffic circle, making it the ideal place to start your Seacoast exploration. With C&J's exclusive offer, you can get 15% off your next stay if you with us, too!

\n

\n ","display_title":"Fairfield Inn by Marriott Portsmouth Seacoast ","gps_latitude":"43.0549153","gps_longitude":"-70.7744136","image":null,"title":"Fairfield Inn by Marriott Portsmouth Seacoast "},{"address":null,"category":"restaurants","coordinates":{"lat":43.056667,"lng":-70.77132},"description":"Comfort food, Italian classic and stellar drinks combine to make for a fun dining experience at Tuscan Kitchen. If you're into fresh baked breads and pastries, as most of us are, it's one of the best stops in Portsmouth. ","description_html":"\n

\n

Tuscan Kitchen

\n

Comfort food, Italian classic and stellar drinks combine to make for a fun dining experience at Tuscan Kitchen. If you're into fresh baked breads and pastries, as most of us are, it's one of the best stops in Portsmouth.

\n

\n ","display_title":"Tuscan Kitchen ","gps_latitude":"43.0566677","gps_longitude":"-70.7713184","image":null,"title":"Tuscan Kitchen "},{"address":null,"category":"restaurants","coordinates":{"lat":43.053688,"lng":-70.75006},"description":"A treasured local breakfast spot, The Golden Egg is located right next to the Sagamore River and offers fresh, affordable dishes whipped up by friendly staff. ","description_html":"\n

\n

The Golden Egg

\n

A treasured local breakfast spot, The Golden Egg is located right next to the Sagamore River and offers fresh, affordable dishes whipped up by friendly staff.

\n

\n ","display_title":"The Golden Egg","gps_latitude":"43.0536887","gps_longitude":"-70.75006","image":null,"title":"The Golden Egg"},{"address":"588 Wentworth Rd, New Castle, NH 03854","category":"restaurants","coordinates":{"lat":43.059856,"lng":-70.726166},"description":"An upscale, refined dining experience in Wentworth by the Sea Hotel & Spa.","description_html":"\n

\n

SALT Kitchen & Bar

\n

An upscale, refined dining experience in Wentworth by the Sea Hotel & Spa.

\n

\n ","display_title":"SALT Kitchen & Bar","gps_latitude":"43.059856","gps_longitude":"-70.726167","image":null,"title":"SALT Kitchen & Bar"},{"address":null,"category":"restaurants","coordinates":{"lat":43.08793,"lng":-70.80442},"description":"If you're looking for a casual, tasty meal just off of Interstate 95 in Portsmouth, you'll fare well here. In addition to the food (or maybe instead of it), there's also a robust menu of Cisco and Redhook brews on tap here and a large, open-air seating area to enjoy them in. ","description_html":"\n

\n

Cisco Brewers

\n

If you're looking for a casual, tasty meal just off of Interstate 95 in Portsmouth, you'll fare well here. In addition to the food (or maybe instead of it), there's also a robust menu of Cisco and Redhook brews on tap here and a large, open-air seating area to enjoy them in.

\n

\n ","display_title":"Cisco Brewers","gps_latitude":"43.08793","gps_longitude":"-70.804417","image":null,"title":"Cisco Brewers"},{"address":null,"category":"restaurants","coordinates":{"lat":43.068157,"lng":-70.7734},"description":"Poke bowls are incredibly popular right now, and so it was inevitable that Portsmouth would get on the craze. The good news is that Ohana offers truly great poke bowl options complete with fresh local seafood and chicken, no fuss and a lot of customization options, plus online ordering and delivery so you can get them right to your hotel. ","description_html":"\n

\n

Ohana Kitchen

\n

Poke bowls are incredibly popular right now, and so it was inevitable that Portsmouth would get on the craze. The good news is that Ohana offers truly great poke bowl options complete with fresh local seafood and chicken, no fuss and a lot of customization options, plus online ordering and delivery so you can get them right to your hotel.

\n

\n ","display_title":"Ohana Kitchen ","gps_latitude":"43.068156","gps_longitude":"-70.7733957","image":null,"title":"Ohana Kitchen "},{"address":"459 Islington St #4, Portsmouth, NH 03801","category":"restaurants","coordinates":{"lat":43.07253,"lng":-70.76879},"description":"Local brewery with a big personality. Try a bratwurst while you're here!","description_html":"\n

\n

Liar's Bench Beer Co.

\n

Local brewery with a big personality. Try a bratwurst while you're here!

\n

\n ","display_title":"Liar's Bench Beer Co. ","gps_latitude":"43.072530","gps_longitude":"-70.768794","image":null,"title":"Liar's Bench Beer Co. "},{"address":"177 Mechanic St, Portsmouth, NH 03801","category":"restaurants","coordinates":{"lat":43.07423,"lng":-70.749535},"description":"A mom-and-pop style restaurant right on the Piscataqua River!","description_html":"\n

\n

Geno's Chowder & Sandwich Shop

\n

A mom-and-pop style restaurant right on the Piscataqua River!

\n

\n ","display_title":"Geno's Chowder & Sandwich Shop","gps_latitude":"43.074230","gps_longitude":"-70.749532","image":null,"title":"Geno's Chowder & Sandwich Shop"},{"address":"104 Congress Street, Portsmouth, NH 03801","category":"restaurants","coordinates":{"lat":43.075966,"lng":-70.75965},"description":"Sample delicious, locally made wines here.","description_html":"\n

\n

LaBelle Winery

\n

Sample delicious, locally made wines here.

\n

\n ","display_title":"LaBelle Winery","gps_latitude":"43.075964","gps_longitude":"-70.759649","image":null,"title":"LaBelle Winery"},{"address":null,"category":"restaurants","coordinates":{"lat":43.076225,"lng":-70.760826},"description":"Besides a fun name, this Portsmouth downtown staple offers tremendous seafood sourced locally, including a Maine crab cake locals and visitors alike have been known to rave about. ","description_html":"\n

\n

Jumpin' Jay's Fish Cafe

\n

Besides a fun name, this Portsmouth downtown staple offers tremendous seafood sourced locally, including a Maine crab cake locals and visitors alike have been known to rave about.

\n

\n ","display_title":"Jumpin' Jay's Fish Cafe ","gps_latitude":"43.0762252","gps_longitude":"-70.7608269","image":null,"title":"Jumpin' Jay's Fish Cafe "},{"address":null,"category":"restaurants","coordinates":{"lat":43.077084,"lng":-70.75688},"description":"A local chain with deep roots in Portsmouth, Dos Amigos offers affordable Mexican fare with fresh ingredients and easy access to other downtown attractions. ","description_html":"\n

\n

Dos Amigos

\n

A local chain with deep roots in Portsmouth, Dos Amigos offers affordable Mexican fare with fresh ingredients and easy access to other downtown attractions.

\n

\n ","display_title":"Dos Amigos ","gps_latitude":"43.0770838","gps_longitude":"-70.7568791","image":null,"title":"Dos Amigos "},{"address":null,"category":"restaurants","coordinates":{"lat":43.077488,"lng":-70.75885},"description":"Tapas lovers will delight at this laid-back, delicious spot. With small plates, a full wine bar and a chef's tasting menu, Cava is one of Portsmouth's best bets for food and wine.","description_html":"\n

\n

Cava

\n

Tapas lovers will delight at this laid-back, delicious spot. With small plates, a full wine bar and a chef's tasting menu, Cava is one of Portsmouth's best bets for food and wine.

\n

\n ","display_title":"Cava ","gps_latitude":"43.0774875","gps_longitude":"-70.7588495","image":null,"title":"Cava "},{"address":null,"category":"restaurants","coordinates":{"lat":43.07735,"lng":-70.76054},"description":"This upscale oyster bar offers craft beers, creative dishes and classics in a modern, well-lit space. ","description_html":"\n

\n

Row 34

\n

This upscale oyster bar offers craft beers, creative dishes and classics in a modern, well-lit space.

\n

\n ","display_title":"Row 34 ","gps_latitude":"43.0773501","gps_longitude":"-70.7605335","image":null,"title":"Row 34 "},{"address":"35 Portwalk Pl, Portsmouth, NH 03801","category":"restaurants","coordinates":{"lat":43.078102,"lng":-70.76135},"description":"Delicious vegan and vegetarian Thai food that the whole family will love!","description_html":"\n

\n

Green Elephant

\n

Delicious vegan and vegetarian Thai food that the whole family will love!

\n

\n ","display_title":"Green Elephant","gps_latitude":"43.078104","gps_longitude":"-70.761354","image":null,"title":"Green Elephant"},{"address":null,"category":"restaurants","coordinates":{"lat":43.07806,"lng":-70.75723},"description":"This lively Bow Street spot has the caliber of seafood you'd expect from a seaside city like Portsmouth, with sushi, a raw bar and creative takes on classic dishes. We recommend the Fleuben, a flounder reuben that is incredibly fun to say out loud. ","description_html":"\n

\n

Surf

\n

This lively Bow Street spot has the caliber of seafood you'd expect from a seaside city like Portsmouth, with sushi, a raw bar and creative takes on classic dishes. We recommend the Fleuben, a flounder reuben that is incredibly fun to say out loud.

\n

\n ","display_title":"Surf","gps_latitude":"43.0780607","gps_longitude":"-70.7572343","image":null,"title":"Surf"},{"address":"100 Market St, Portsmouth, NH 03801","category":"restaurants","coordinates":{"lat":43.078484,"lng":-70.75789},"description":"Great seafood and intimate cooking classes.","description_html":"\n

\n

Lure Bar & Kitchen

\n

Great seafood and intimate cooking classes.

\n

\n ","display_title":"Lure Bar & Kitchen","gps_latitude":"43.078482","gps_longitude":"-70.757889","image":null,"title":"Lure Bar & Kitchen"},{"address":null,"category":"attractions","coordinates":{"lat":43.075523,"lng":-70.75368},"description":"Historic structures abound at Strawbery Banke, which is home to house tours, rich gardens and ice skating in the wintertime. You won't want to miss a Portsmouth holiday tradition this winter when the lights come on and hundreds head to Strawbery Banke for the Candlelight Stroll, too.","description_html":"\n

\n

Strawbery Banke Museum

\n

Historic structures abound at Strawbery Banke, which is home to house tours, rich gardens and ice skating in the wintertime. You won't want to miss a Portsmouth holiday tradition this winter when the lights come on and hundreds head to Strawbery Banke for the Candlelight Stroll, too.

\n

\n ","display_title":"Strawbery Banke Museum ","gps_latitude":"43.075524","gps_longitude":"-70.753677","image":null,"title":"Strawbery Banke Museum "},{"address":null,"category":"attractions","coordinates":{"lat":43.076668,"lng":-70.75169},"description":"This Portsmouth waterfront gem of a park features views of the Piscataqua River, plenty of open green space to enjoy and carefully tended gardens full of flowers. During the summertime, you can also catch shows here thanks to the Prescott Park Arts Festival.","description_html":"\n

\n

Prescott Park

\n

This Portsmouth waterfront gem of a park features views of the Piscataqua River, plenty of open green space to enjoy and carefully tended gardens full of flowers. During the summertime, you can also catch shows here thanks to the Prescott Park Arts Festival.

\n

\n ","display_title":"Prescott Park","gps_latitude":"43.076668","gps_longitude":"-70.751693","image":null,"title":"Prescott Park"},{"address":"60 Marcy St, Portsmouth, NH 03801","category":"attractions","coordinates":{"lat":43.076687,"lng":-70.75254},"description":"Go on a sailing excursion in the Piscataqua River!","description_html":"\n

\n

Gundalow Company

\n

Go on a sailing excursion in the Piscataqua River!

\n

\n ","display_title":"Gundalow Company","gps_latitude":"43.076686","gps_longitude":"-70.752541","image":null,"title":"Gundalow Company"},{"address":"64 State Street, Portsmouth, NH ","category":"attractions","coordinates":{"lat":43.076138,"lng":-70.754196},"description":"The eclectic and the vintage merge at Pickwick's, one of the most highly-recommended shop in a constellation of options in downtown Portsmouth. Come for goods \"from another space and time,\" stay for the awesome vintage clothing the shopkeepers wear daily. ","description_html":"\n

\n

Pickwick's Mercantile

\n

The eclectic and the vintage merge at Pickwick's, one of the most highly-recommended shop in a constellation of options in downtown Portsmouth. Come for goods \"from another space and time,\" stay for the awesome vintage clothing the shopkeepers wear daily.

\n

\n ","display_title":"Pickwick's Mercantile ","gps_latitude":"43.0761369","gps_longitude":"-70.754193","image":null,"title":"Pickwick's Mercantile "},{"address":null,"category":"attractions","coordinates":{"lat":43.075935,"lng":-70.75947},"description":"One of Portsmouth's cultural hubs and the Seacoast's most historic theater, The Music Hall features national and local acts, major and independent films, and some of the community's liveliest events.","description_html":"\n

\n

The Music Hall

\n

One of Portsmouth's cultural hubs and the Seacoast's most historic theater, The Music Hall features national and local acts, major and independent films, and some of the community's liveliest events.

\n

\n ","display_title":"The Music Hall ","gps_latitude":"43.075936","gps_longitude":"-70.759470","image":null,"title":"The Music Hall "},{"address":null,"category":"attractions","coordinates":{"lat":43.076256,"lng":-70.759796},"description":"Portsmouth isn't the biggest city, but you can't walk very far without running into a genuine attraction. The Discover Portsmouth Center makes exploring the city's cultural hotspots easy, and features regional art exhibits and knowledgeable locals, as well. ","description_html":"\n

\n

Discover Portsmouth Center

\n

Portsmouth isn't the biggest city, but you can't walk very far without running into a genuine attraction. The Discover Portsmouth Center makes exploring the city's cultural hotspots easy, and features regional art exhibits and knowledgeable locals, as well.

\n

\n ","display_title":"Discover Portsmouth Center","gps_latitude":"43.076255","gps_longitude":"-70.7597998","image":null,"title":"Discover Portsmouth Center"},{"address":"29 Congress Street, Portsmouth, NH 03801","category":"attractions","coordinates":{"lat":43.076714,"lng":-70.758675},"description":"A great stop for cute and unique greeting cards and other fun art supplies.","description_html":"\n

\n

Gus & Ruby Letterpress

\n

A great stop for cute and unique greeting cards and other fun art supplies.

\n

\n ","display_title":"Gus & Ruby Letterpress","gps_latitude":"43.076715","gps_longitude":"-70.758672","image":null,"title":"Gus & Ruby Letterpress"},{"address":null,"category":"attractions","coordinates":{"lat":43.077442,"lng":-70.76108},"description":"Portsmouth has a thriving arts scene, and 3S Artspace is one of the best places to catch up with locals and local acts. Add in good food and libations and you have the ideal place to wile away an evening if you're musically-inclined.","description_html":"\n

\n

3S Artspace

\n

Portsmouth has a thriving arts scene, and 3S Artspace is one of the best places to catch up with locals and local acts. Add in good food and libations and you have the ideal place to wile away an evening if you're musically-inclined.

\n

\n ","display_title":"3S Artspace ","gps_latitude":"43.0774403","gps_longitude":"-70.7610794","image":null,"title":"3S Artspace "},{"address":"101 Market St, Portsmouth, NH 03801","category":"attractions","coordinates":{"lat":43.078568,"lng":-70.75753},"description":"Consignment deals and designer finds!","description_html":"\n

\n

Wear House

\n

Consignment deals and designer finds!

\n

\n ","display_title":"Wear House","gps_latitude":"43.078567","gps_longitude":"-70.757533","image":null,"title":"Wear House"},{"address":"129 Market St, Portsmouth, NH 03801","category":"attractions","coordinates":{"lat":43.078857,"lng":-70.757965},"description":"Cute bags and totes made from recycled sails.","description_html":"\n

\n

Sea Bags

\n

Cute bags and totes made from recycled sails.

\n

\n ","display_title":"Sea Bags","gps_latitude":"43.078858","gps_longitude":"-70.757963","image":null,"title":"Sea Bags"},{"address":null,"category":"hotels","coordinates":{"lat":43.075836,"lng":-70.75766},"description":"A historic home once belonging to (as you might guess) a sailmaker, this hotel mixes casual and stylish lodging with a community garden and sitting room so you can swap travel stories with your fellow guests. ","description_html":"\n

\n

The Sailmaker's House

\n

A historic home once belonging to (as you might guess) a sailmaker, this hotel mixes casual and stylish lodging with a community garden and sitting room so you can swap travel stories with your fellow guests.

\n

\n ","display_title":"The Sailmaker's House ","gps_latitude":"43.0758375","gps_longitude":"-70.7576583","image":null,"title":"The Sailmaker's House "},{"address":null,"category":"hotels","coordinates":{"lat":43.075363,"lng":-70.760086},"description":"This boutique hotel located within walking distance of Market Square offers charming accommodations, free breakfast, and a staff always willing and able to recommend great attractions in Portsmouth. ","description_html":"\n

\n

The Hotel Portsmouth

\n

This boutique hotel located within walking distance of Market Square offers charming accommodations, free breakfast, and a staff always willing and able to recommend great attractions in Portsmouth.

\n

\n ","display_title":"The Hotel Portsmouth","gps_latitude":"43.0753613","gps_longitude":"-70.7600882","image":null,"title":"The Hotel Portsmouth"},{"address":null,"category":"hotels","coordinates":{"lat":43.078186,"lng":-70.75752},"description":"Ever wanted to spend the night in an old brewery located in Portsmouth? With The Ale House Inn, you can do exactly that, with a contemporary atmosphere and high-tech amenities to boot. ","description_html":"\n

\n

The Ale House Inn

\n

Ever wanted to spend the night in an old brewery located in Portsmouth? With The Ale House Inn, you can do exactly that, with a contemporary atmosphere and high-tech amenities to boot.

\n

\n ","display_title":"The Ale House Inn","gps_latitude":"43.0781848","gps_longitude":"-70.7575237","image":null,"title":"The Ale House Inn"},{"address":null,"category":"hotels","coordinates":{"lat":43.0799,"lng":-70.76278},"description":"This upscale, lively hotel located near Portsmouth's historic downtown features an indoor pool, fitness center, and views of the Piscataqua River and Portsmouth Harbor. ","description_html":"\n

\n

Sheraton Portsmouth Harborside

\n

This upscale, lively hotel located near Portsmouth's historic downtown features an indoor pool, fitness center, and views of the Piscataqua River and Portsmouth Harbor.

\n

\n ","display_title":"Sheraton Portsmouth Harborside","gps_latitude":"43.079898","gps_longitude":"-70.762779","image":null,"title":"Sheraton Portsmouth Harborside"}]; function initInteractiveMap() { InteractiveMap( document.getElementById('map'), mapOptions, locations ); }; function InteractiveMap(el, options, locations) { const mapStyles = [ { elementType: "labels.text.fill", stylers: [{ color: "#235495" }] }, { featureType: "landscape.man_made", elementType: "geometry.fill", stylers: [{ color: "#e5e5e5" }] }, { featureType: "landscape.natural", elementType: "geometry.fill", stylers: [{ color: "#ced4d8" }] }, { featureType: "poi.business", stylers: [{ visibility: "off" }] }, { featureType: "poi.park", elementType: "geometry.fill", stylers: [{ color: "#c4e0ba" }] }, { featureType: "poi.park", elementType: "labels.text", stylers: [{ visibility: "off" }] }, { featureType: "road", elementType: "geometry.fill", stylers: [{ color: "#9facb7" }] }, { featureType: "road.arterial", elementType: "labels", stylers: [{ visibility: "off" }] }, { featureType: "road.highway", elementType: "geometry.stroke", stylers: [{ color: "#738693" }] }, { featureType: "road.highway", elementType: "labels", stylers: [{ visibility: "off" }] }, { featureType: "road.local", stylers: [{ visibility: "off" }] }, { featureType: "transit.line", elementType: "geometry", stylers: [{ visibility: "off" }] }, { featureType: "water", elementType: "geometry.fill", stylers: [{ color: "#a1d6e2" }] }, ]; if (!options.styles) { options.styles = mapStyles; } this.el = el; this.options = options; this.map = null; this.siteHeader = document.querySelector('.headroom'); this.siteFooter = document.querySelector('.sr-footer-nav'); this.mapWrapper = document.querySelector('.interactive-map'); this.mapHeader = this.mapWrapper.querySelector('.map-header'); this.mapLegend = this.mapWrapper.querySelector('.map-legend'); this.locations = locations; this.markers = []; this.tooltips = []; this.noMapResize = window.matchMedia('(max-width: 543px)'); this.legendOverlayBp = window.matchMedia('(min-width: 544px)'); this.isLandscape = window.matchMedia('(orientation: landscape)'); initMap(); resizeMap(); registerEvents(); function initMap() { this.map = new google.maps.Map(this.el, this.options); let maxWidth = calcTooltipMaxWidth(); this.locations.forEach((loc) => { let el = document.createElement('div'); el.innerHTML = loc.description_html.trim(); el = el.firstChild; let tooltip = new google.maps.InfoWindow({ content: el, // @todo Add some way to update this value, if window size changes maxWidth: maxWidth, }); tooltip.el = el; tooltip.headerClone = null; google.maps.event.addListener(tooltip, 'domready', () => { // Because of the way we have to structure this component's HTML, Google maps, and the terrible CSS // feature known as z-index, we'll have to do some hacky reworking, to prevent // info windows from being covered by the map's overlayed title. Basically, we'll // hide the existing map header when to info window opens, clone it, and insert into // Google Map's HTML structure, in a place where z-index contexts will be the same for // the info window, and header. That way we can stack the header behind the info window. tooltip.headerClone = $(this.mapHeader).clone().addClass('map-heaader-clone'); setTimeout(() => { $(this.el).find('.gm-style-pbc + div').append(tooltip.headerClone); this.mapHeader.classList.add('hidden'); }); }); tooltip.closeClickHandler = () => { // Read the comment from the above event, to find out why we're doing something // so odd. $(tooltip.headerClone).remove(); this.mapHeader.classList.remove('hidden'); }; google.maps.event.addListener(tooltip, 'closeclick', tooltip.closeClickHandler); this.tooltips.push(tooltip); let marker = new google.maps.Marker({ position: loc.coordinates, icon: this.options.icons[loc.category], map: this.map, title: loc.title, }); marker.tooltip = tooltip; tooltip.marker = marker; marker.category = loc.category; marker.location = loc; this.markers.push(marker); marker.addListener('click', () => { // If the tooltip has a map prop, that means it is open... if (tooltip.map) { tooltip.closeClickHandler(); tooltip.close(); } else { this.tooltips.forEach(t => t.close()); tooltip.open(this.map, marker); } }); }); } function calcTooltipMaxWidth() { let gutter = 30 * 2; let max = 350; return Math.min(document.documentElement.offsetWidth - gutter, max); } function registerEvents() { // Resize on any device, when switch to landscape this.isLandscape.addListener((mq) => { if (mq.matches) { resize(); } }); window.addEventListener('resize', () => { resize(); }, false); window.addEventListener('orientationchange', () => { resize(); }, false); let legendOpenBtn = this.mapWrapper.querySelector('.legend-btn-open'); legendOpenBtn.addEventListener('click', () => { let openClass = 'map-legend--open'; if (this.mapLegend.classList.contains(openClass)) { this.mapLegend.classList.remove(openClass); } else { this.mapLegend.classList.add(openClass); } }); let legendBtns = Array.prototype.slice.call(this.mapWrapper.querySelectorAll('.legend-btn')); let btnClick = (event) => { let el = $(event.target).closest('.legend-btn')[0]; handleLegendBtnClick(el); }; legendBtns.forEach((btn) => { btn.addEventListener('click', btnClick); }); } function resize() { resizeMap(); resizeTooltips(); } function resizeMap() { let viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); // @todo need to handle situations where VP height is less than header height let height = viewportHeight - this.siteHeader.offsetHeight; if (this.legendOverlayBp.matches === false) { // height = height - this.mapHeader.offsetHeight - this.mapLegend.offsetHeight; // height = height - this.mapLegend.offsetHeight; } // Account for site alert bar, if present let alertBar = document.querySelector('.struct-site-alert'); if (alertBar) { height -= alertBar.offsetHeight; } this.el.style.height = height + 'px'; google.maps.event.trigger(this.map, 'resize'); } function resizeTooltips() { let max = calcTooltipMaxWidth(); this.tooltips.map(t => { t.maxWidth = max; t.setContent(t.getContent()); }); } function handleLegendBtnClick(el) { let enabled = (el.dataset.enabled === '1'); let disabledClass = 'legend-title--disabled'; if (enabled) { el.dataset.enabled = '0'; disableMarkers(el.dataset.category); el.classList.add(disabledClass); } else { el.dataset.enabled = '1'; enableMarkers(el.dataset.category); el.classList.remove(disabledClass); } } function enableMarkers(category) { this.markers.forEach((marker) => { if (marker.category === category) { marker.setVisible(true); } }); } function disableMarkers(category) { this.markers.forEach((marker) => { if (marker.category === category) { marker.setVisible(false); marker.tooltip.closeClickHandler(); marker.tooltip.close(); } }); } }

Interactive Portsmouth Map for Travelers | C&J Bus Lines (2024)

References

Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6090

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.