![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@goodhood/map
Advanced tools
@goodhood/map
React map components
npm i @goodhood/map
Install peer dependencies
npm i react // v16.x.x
npm i prop-types // v15.x.x
npm i clsx // v2.x.x
npm i nebenan-ui-kit // v4.x.x
npm i @babel/runtime // v7.x.x
npm i @goodhood/icons // v1.x.x
Include css
import '@goodhood/map/styles.css'
import Map from '@goodhood/map/lib/map';
import Polygon from '@goodhood/map/lib/polygon';
import Map from '@goodhood/map/lib/map';
const App = () => (
<Map
{/* Credentials for maptiler */}
credentials={{ key: 'Maptiler API secret key', map_id: 'Map style id' }}
{/* Max zoom level */}
maxZoom={10}
{/* Min zoom level */}
minZoom={5}
{/* Bounds of the map. If the prop is passed, it overrides the bounding box of map layers. */}
bounds={[]}
{/* Lock map on desktop */}
locked={true}
{/* Lock map on mobile */}
lockedMobile={true}
{/* Animate transition of map view */}
animate={true}
{/* Change attribution style, possible values: 'default', 'compact', 'hidden' */}
attribution={'default'}
{/* Text to display when WebGL is not supported by browser */}
webGLError="WebGL is not supported"
{/* Fired when map styles are loaded. Takes map as an argument */}
onLoad={(map) => { alert('Loaded') }}
>
{/* Map layers. if bounds prop is not specified, the map will try to get bounds from layers */}
</Map>
);
import Polygon from '@goodhood/map/lib/polygon';
const App = () => (
<Polygon
{/* GeoJSON coordinates of polygon */}
area={[]}
{/* Polygon style. Get values from @goodhood/map/lib/polygon/constants */}
type={POLYGON_ACTIVE}
{/* Click event */}
onClick={() => console.log('Clicked')}
/>
);
import Circle from '@goodhood/map/lib/circle';
const App = () => (
<Circle
{/* GeoJSON coordinates of circle center */}
center={[]}
{/* Circle radius in px */}
radius={300}
{/* Circle style. Get values from @goodhood/map/lib/circle/constants */}
type={CIRCLE_ACTIVE}
/>
);
import Marker from '@goodhood/map/lib/marker';
const App = () => (
<Marker
{/* GeoJSON coordinates of marker */}
position={[]}
{/* Content that will be rendered in marker popup */}
popupContent={<ReactElement />}
{/* Open marker popup on initialization */}
popupDefaultState={true}
{/* Popup offset relative to marker position */}
popupOffset={[x, y]}
>
{/* Marker's content. Can be image or styled element */}
</Marker>
);
// All markers below are wrappers around <Marker /> component.
// They receive same props as <Marker />
<CircleMarker />
<EyecatcherMarker />
<ImageMarker />
<InfoMarker />
<LabelMarker />
<PinMarker />
import { Popup, Marker } from '@goodhood/map';
const App = () => (
<Marker>
<Popup
{/* Offset relative to marker position */}
offsetX={0}
offsetY={0}
{/* Open popup by default */}
defaultOpen={true}
>
{/* Popup's content. Can be image or styled element */}
</Popup>
</Marker>
);
config/local.js
file (see config/default.js
)npm run start
src/*/index.jsx
// src/map/index.jsx
export const MapType = 123;
export Map 666;
// usage
import { Map, MapType } from '@goodhood/map';
src/*/index.stories.jsx
FAQs
React map components
We found that @goodhood/map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.