{"id":18819439,"url":"https://github.com/a7medev/react-native-map-input","last_synced_at":"2026-01-16T04:30:18.332Z","repository":{"id":57338218,"uuid":"372977616","full_name":"a7medev/react-native-map-input","owner":"a7medev","description":"A React Native Component for Getting Location using a Map","archived":false,"fork":false,"pushed_at":"2021-12-20T15:58:34.000Z","size":11731,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T18:54:56.058Z","etag":null,"topics":["android","formik","forms","ios","react","react-native","react-native-maps"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a7medev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-01T22:37:23.000Z","updated_at":"2022-10-07T11:04:03.000Z","dependencies_parsed_at":"2022-08-31T07:51:47.742Z","dependency_job_id":null,"html_url":"https://github.com/a7medev/react-native-map-input","commit_stats":null,"previous_names":["a7med-mahmoud/react-native-map-input"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medev%2Freact-native-map-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medev%2Freact-native-map-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medev%2Freact-native-map-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a7medev%2Freact-native-map-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a7medev","download_url":"https://codeload.github.com/a7medev/react-native-map-input/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239754722,"owners_count":19691345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","formik","forms","ios","react","react-native","react-native-maps"],"created_at":"2024-11-08T00:23:04.853Z","updated_at":"2026-01-16T04:30:18.291Z","avatar_url":"https://github.com/a7medev.png","language":"TypeScript","readme":"# React Native Map Input\n\nA React Native Component for Getting Location using a Map\n\n\u003ccenter\u003e\n  \u003cimg src=\"./example-by-region.gif\" style=\"margin-right: 20px\"\u003e\n  \u003cimg src=\"./example-by-marker.gif\"\u003e\n\u003c/center\u003e\n\n### Installation\n\n```sh\nyarn add react-native-map-input\n```\n\nor\n\n```sh\nnpm install react-native-map-input --save\n```\n\n#### You have to install:\n\n- [react-native-maps](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md)\n- [react-native-svg](https://github.com/react-native-svg/react-native-svg#installation)\n\n### Example\n\n1. Usage with basic React state\n\n   ```jsx\n   import React, { useState } from 'react';\n   import MapInput, { MapInputVariant } from 'react-native-map-input';\n\n   const MyForm = () =\u003e {\n     const [coordinate, setCoordinate] = useState({\n       latitude: 37.78825,\n       longitude: -122.4324,\n       latitudeDelta: 0.0922,\n       longitudeDelta: 0.0421,\n     });\n\n     return (\n       // ...\n       \u003cMapInput\n         region={coordinate}\n         onChange={setCoordinate}\n         variant={MapInputVariants.BY_REGION} {/* or BY_MARKER if you want */}\n       /\u003e\n       // ...\n     );\n   };\n   ```\n\n2. Usage with Formik\n\n   ```jsx\n   import React from 'react';\n   import { Formik } from 'formik';\n   import FormikMapInput from 'react-native-map-input/FormikMapInput';\n\n   const initialValues = {\n     // ...\n     location: {\n       latitude: 37.78825,\n       longitude: -122.4324,\n       latitudeDelta: 0.0922,\n       longitudeDelta: 0.0421,\n     },\n     // ...\n   };\n\n   const MyForm = () =\u003e {\n     const handleSubmit = (data) =\u003e {\n       console.log(data.location);\n     };\n\n     return (\n       \u003cFormik initialValues={initialValues} onSubmit={handleSubmit}\u003e\n         {() =\u003e (\n           // ...\n           \u003cFormikMapInput\n             name=\"location\"\n             variant={MapInputVariants.BY_REGION} {/* or BY_MARKER if you want */}\n           /\u003e\n           // ...\n         )}\n       \u003c/Formik\u003e\n     );\n   };\n   ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7medev%2Freact-native-map-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa7medev%2Freact-native-map-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa7medev%2Freact-native-map-input/lists"}