How to remove padding from Popup? · Issue #716 - GitHub
文章推薦指數: 80 %
react-map-gl render a Mapbox popup component. If you want to use customized styles, you can override mapbox pop styles.
Skiptocontent
{{message}}
visgl
/
react-map-gl
Public
Notifications
Fork
1.2k
Star
6.6k
Code
Issues
11
Pullrequests
5
Discussions
Actions
Security
Insights
More
Code
Issues
Pullrequests
Discussions
Actions
Security
Insights
Newissue
Haveaquestionaboutthisproject?SignupforafreeGitHubaccounttoopenanissueandcontactitsmaintainersandthecommunity.
Pickausername
EmailAddress
Password
SignupforGitHub
Byclicking“SignupforGitHub”,youagreetoourtermsofserviceand
privacystatement.We’lloccasionallysendyouaccountrelatedemails.
AlreadyonGitHub?
Signin
toyouraccount
Jumptobottom
HowtoremovepaddingfromPopup?
#716
Closed
juiceoopenedthisissue
Feb5,2019
·2comments
Closed
HowtoremovepaddingfromPopup?
#716
juiceoopenedthisissue
Feb5,2019
·2comments
Comments
Copylink
juiceo
commented
Feb5,2019
•
edited
Isthereawaytoremovethepadding(and/orbackgroundcolor)fromthePopupcomponent(withoutoverridingthecssstyleinmystylesheet)?SayIwantedtomakethebackgroundofmypopupsred:
Thetextwasupdatedsuccessfully,buttheseerrorswereencountered:
Allreactions
Copylink
Collaborator
xintongxia
commented
Feb6,2019
react-map-glrenderaMapboxpopupcomponent.
Ifyouwanttousecustomizedstyles,youcanoverridemapboxpopstyles.
Youcanreferthisdocandsearchpopup.
Thefollowingmightbehelpful.
.mapboxgl-popup-content{
background:red;
}
.mapboxgl-popup-tip{
background:red;
}
❤️
1
itzjustalanreactedwithheartemoji
Allreactions
❤️
1reaction
Sorry,somethingwentwrong.
Pessimistress
closedthisascompleted
Jun12,2019
Copylink
disambiguator
commented
Jun25,2019
•
edited
Areyouallopentoallowingdynamicstylingofpopupsthroughinlinestyling?Thiscurrentsolutiondoesn'tworkforusbecausewedecidepopupcolorprogrammaticallybasedontheelementbeinghoveredover.
IwouldloveasolutionsimilartothewaytipSizeisabletobepassedin,forexample:
延伸文章資訊
- 1How to Create a Map Popup Component Using Mapbox and ...
This guide will teach you how to add popups to a web map using React and Mapbox GL JS. Introducti...
- 2How to display Popups on a Mapbox Map - Morioh
import ReactMapGL, {Marker, Popup } from 'react-map-gl'; const CustomPopup = ({index, marker, clo...
- 3How to remove padding from Popup? · Issue #716 - GitHub
react-map-gl render a Mapbox popup component. If you want to use customized styles, you can overr...
- 4Popup - react-map-gl
A string indicating the part of the popup that should be positioned closest to the coordinate, se...
- 5react-map-gl | Markers & Popups Example
Marker, Popup, NavigationControl and FullscreenControl. Map showing top 20 most populated cities ...