heigeo/leaflet.wms

Error with GetfeaturedInfo

lockesoft opened this issue · 4 comments

Hello,
I am using leaflet.wms on the next page:

https://lockesoft.ovh/campo/pruebassigpac.php

The problem is that when I retrieve the information with GetFeaturedInfo sometimes I retrieve it as < html >< head >< / head > < body > * Here I receive the information < /body > < / html >

and other times I receive it in the following format:

<iframe src = a very long link>

Why do I receive it one way each time?

I would always be interested in receiving it in the same way, if we cannot format the information

The iframe is generated when there is a getFeatureInfo error, most probably because of a CORS-error. So it's probably related to #65.

Can you see any errors in the console?

Thanks, after several tests I have solved this error, it was because I was loading the wrong layer.

Now I load the correct layer with which I see a layer with all the agricultural plots and when I click on the plot I get all the data correctly.

My question is: Could I get the points from the shape drawn on the map that I click on?

I leave a link to the current map to try to make it easier to understand:

I am getting an error when clicking on your map:

Uncaught ReferenceError: lati is not defined

And I'm not sure I understand your question. Do you want to get the coordinates of your click?

Sorry, I am testing when I have time and sometimes I leave it halfway until I can resume testing.

I leave you a new url so you can see it:
http://lockesoft.ovh/campo/nuevafinca.php
When I click on any of the parcels that appear drawn on the map, I open a pop-up with some information and two buttons (although this is irrelevant today). What I would like is when clicking on the plot, apart from showing the pop-up, it would be to obtain the coordinates that form the points that draw the shape of the plot.

It's possible?