bradcornford / Googlmapper

An easy way to integrate Google Maps with Laravel
MIT License
464 stars 142 forks source link

InvalidValueError: setIcon: not a string; and no url property; and no path property #396

Open MAyankprine20001 opened 3 months ago

MAyankprine20001 commented 3 months ago

when i call this first time for dropping the image in the map then is show me error InvalidValueError: setIcon: not a string; and should be a PinView; and no url property; and no path property . this is come when is call import React from "react"; import { Marker } from "@react-google-maps/api";

const DraggableMarker = ({ gatePosition, gateImage, handleGateDrag, handleGateDrop, gateId, rotation, }) => { // console.log("gate image" , pos) const onDragEnd = (e) => { const newLat = e.latLng.lat(); const newLng = e.latLng.lng(); handleGateDrop({ lat: newLat, lng: newLng }, gateId); };

const onDrag = (e) => { const newLat = e.latLng.lat(); const newLng = e.latLng.lng(); handleGateDrag({ lat: newLat, lng: newLng }); };

return (

); };

export default DraggableMarker; can any resolv this