@react-native-mapbox-gl/maps - npm

文章推薦指數: 80 %
投票人數:10人

A Mapbox GL react native module for creating custom maps. Latest version: 8.6.0-beta.0, last published: 2 months ago. @react-native-mapbox-gl/maps8.6.0-beta.0 • Public • Published2monthsagoReadmeExploreBETA9Dependencies6Dependents40Versions 🟥Futureofthisrepo:participateinthediscussionthread🟥 Callforadditionalmaintainers Heyyou,yesyou! Doyoulikethisrepo,areyouusingit(areyouusingitforproductionapps?!It'scool,wedotoo!)? Ifyouhavesometimetospare,we'dlovetogetyourhelp! Ihearyouask"Yes,YES,butHow?!"(indeafeningsilence), well...herearesomeexamples: checkourdocs(stilluptodate?needsomeedits?) reviewissueticketsandreplywithhelpfulanswers jointheGitterchatandengagewithotherusers reviewPRsandcommentonthingsyounotice activelyhelpmovetheprojectforwardbysubmittingPRsthatintroducefixesandfeatures Youdon'tneedtobeafull-fledgedmaintainertodothosethings,however, ifyouareinterestedinbecomingone,don'thesitatetoreplyinthisdiscussion. Thanks🙇 MapboxMapsSDKforReactNative AnunofficialReactNativelibraryforbuildingmapswith theMapboxMapsSDKforiOSandMapboxMapsSDKforAndroid WealsosupportMapLibreflavorsofMapboxSDKsnow🎉 Prerequisite OnAndroidwesupportfromversion6(API23)upwards PleaseSignUptoMapboxtogettheMapboxAccessToken. Dependencies node npm ReactNative(0.60+) Installation Step1-InstallPackage: #installwithYarn yarnadd@react-native-mapbox-gl/maps #orinstallwithNPM npminstall@react-native-mapbox-gl/maps--save Step2-InstallationGuides: Android iOS Expo Example GettingStarted Formoreinformation,checkoutourGettingStartedsection RunProject BeforeyourunyourprojectbesureyouhavecompletededtheInstallationGuidesforAndroidoriOS. RuniOSSimulator #Runwithyarn yarnrunios #orRunwithNPM npmrunios RunAndroidEmulator #Runwithyarn yarnrunandroid #orRunwithNPM npmrunandroid Addingamap importReact,{Component}from'react'; import{StyleSheet,View}from'react-native'; importMapboxGLfrom'@react-native-mapbox-gl/maps'; MapboxGL.setAccessToken(''); conststyles=StyleSheet.create({ page:{ flex:1, justifyContent:'center', alignItems:'center', backgroundColor:'#F5FCFF' }, container:{ height:300, width:300, backgroundColor:'tomato' }, map:{ flex:1 } }); exportdefaultclassAppextendsComponent{ render(){ return( ); } } Documentation Components MapView Light StyleSheet PointAnnotation MarkerView Callout Camera UserLocation Images Sources VectorSource ShapeSource RasterSource Layers BackgroundLayer CircleLayer FillExtrusionLayer FillLayer LineLayer RasterLayer SymbolLayer HeatmapLayer Offline OfflineManager SnapshotManager Misc MapboxGL CustomHttpHeaders Logger ExpoSupport ThispackageisnotavailableintheExpoGoapp.Learnhowyoucanuseitwithcustomdevclients. TestingwithJest Thislibraryprovidessomemockswhicharenecessaryforrunningtests. Example: "jest":{ "preset":"react-native", "setupFilesAfterEnv":["@react-native-mapbox-gl/maps/setup-jest"] } DeveloperGroup Haveaquestionorneedsomehelp?JoinourGitterdevelopergroup! Keywordsgliosandroidmapboxreact-nativeInstallnpmi@react-native-mapbox-gl/mapsRepositoryGitgithub.com/rnmapbox/mapsHomepagegithub.com/rnmapbox/maps#readmeDownloadsWeeklyDownloads12,709Version8.6.0-beta.0LicenseMITUnpackedSize2.54MBTotalFiles389Lastpublish2monthsagoCollaboratorsTryonRunKitReportmalware



請為這篇文章評分?