New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marker with Modal do not works #155
Comments
Hey, I think the issue is that you don't add the As you don't have the option to make the const RouteModel = (props) => {
const [modal, setModal] = useState(false);
return (
<>
<Marker onClick={() => setModal(!modal)} {...props} />
{(modal) && (
<Modal
isOpen={modal}
onRequestClose={() => setModal(!modal)}
ariaHideApp={false}
>
<h2>{props.name}</h2>
<p>{props.name}</p>
<button onClick={toggleModal}>Close</button>
</Modal>
)}
</>
);
} Note though for this to work you have to pass |
I have the same problem , could you solved? |
You need to put So, following is valid <Map>
<Marker ... />
</Map> This is also valid <Map>
{makersList.map(marker => ( <Marker ... /> ))}
</Map> Following is invalid const CustomMarker = () => (
<Marker ... />
)
.....
<Map>
<CustomMarker ... />
</Map> |
Hello,
I have created a custom component to show a marker then when pressed opens a Modal;
here's the code
the modal works fine but the marker is placed on the top left corner of the webapp (check screenshot)
by doing some checking i've seen that the
lat
andlng
are passed correctly to the component but when rendered they somehow get lost as i don't see notransform
property in the style when running the inspector.am I missing something?
The text was updated successfully, but these errors were encountered: