# Correção na criação de rotas otimizadas com validação de latitude e longitude zeradas

Foi identificado que, ao tentar criar rotas otimizadas, o Consumer impossibilitava quando a latitude e longitude de algumas rotas estavam zeradas, o que impedia a criação correta das rotas e impactava negativamente no fluxo de trabalho.

Foi criada uma validação para garantir que, caso a latitude e longitude de uma rota estejam zeradas, o Consumer não gere erros críticos. Em vez disso, será apresentada uma mensagem informando o problema, e a rota otimizada será gerada corretamente para as rotas que possuem dados válidos de latitude e longitude.

<figure><img src="/files/Piql0jtA6zHPGzzs8prF" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/gi2rmBVKAJP9qeYG1vy6" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://atualizacoes.consumer.com.br/pdv/anteriores/15.2.0/15.2.0.2-beta/correcao-na-criacao-de-rotas-otimizadas-com-validacao-de-latitude-e-longitude-zeradas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
