Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

249
Visualizações
Exception thrown while executing UI block: [NSNull doubleValue]: unrecognized selector sent to instance 0x204329c00

I am trying to display icon relative to specific coordinates on a map, but I keep getting this error thrown, followed by:

removedChildren count(0) was not what we expected (1)

This won't allow the pin to show up on the map. Below is my code:

const [restaurant_Latitude, setRestaurantLatitude] = useState(0)
const [restaurant_Longitude, setRestaurantLongitude] = useState(0)
const [restaurantPositionError, setRestaurantPositionError] = useState(null)

Using react-native-svg to create an icon

const restaurantIcon = () =>{
      return(
        <Svg
          height = {30}
          width = {30}
        >
          <Ellipse
            cx="10"
            cy="10"
            rx="10"
            ry="10"
            fill="red"
            stroke="#fff"
            strokeWidth="2"
          />

        </Svg>
        )
    }

//useEffect to get restaurant's coordinates

useEffect(() =>{

...

displayRestaurantInfo = async () =>{
 let restaurantInfo = client_instance.getFoodInfo()

   setRestaurantLatitude(restaurantInfo.latitude)
   setRestaurantLongitude(restaurantInfo.longitude)
   setRestaurantPositionError(null)
}

displayRestaurantInfo()

)
}

...

//How it renders in the MapView

return(
      
        <MapView>

            <Marker 
                coordinate={ 
                    {latitude: restaurantLatitude,
                     longitude: restaurantLongitude,
                     error: position_error,
                    }}
              >
                <View>
                  {(restaurantIcon())}
                </View>
              </Marker>
</MapView>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda