Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
Reaccionar API de Google Maps: contiene la ubicación "b.get no es una función"

Estoy creando un marcador donde se hace clic en el mapa y quiero saber si este marcador está dentro o fuera del polígono. Utilizo la función containsLocation para esto, pero sigo recibiendo el siguiente error "TypeError: b.get is not a function". Gracias de antemano por sus respuestas.

 function App() { const refPoly = useRef(null); const [position, setPosition] = useState(null); const center = { lat: 25.774, lng: -80.19, }; const containerStyle = { position: "absolute", width: "70%", height: "70%", }; const bermudaTriangle = [ { lat: 25.774, lng: -80.19 }, { lat: 18.466, lng: -66.118 }, { lat: 32.321, lng: -64.757 }, ]; const google = window.google; const onHandleClickMap = (event) => { setPosition({ lat: event.latLng.lat(), lng: event.latLng.lng() }); console.log( google.maps.geometry.poly.containsLocation(event.latLng, bermudaTriangle) ); }; return ( <div className="App"> <LoadScript googleMapsApiKey={GOOGLE_MAPS_API_KEY} id="script-loader" libraries={["geometry"]} > <GoogleMap mapContainerStyle={containerStyle} center={center} zoom={18} onClick={onHandleClickMap} > <Polygon ref={refPoly} paths={bermudaTriangle} strokeColor="#0000FF" strokeOpacity={0.8} strokeWeight={2} fillColor="#0000FF" fillOpacity={0.35} /> {position && <Marker position={position} />} </GoogleMap> </LoadScript> </div> ); }
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!