[mapserver-users] GetFeatureInfo and wms_time
andrea.marinetti at virgilio.it
andrea.marinetti at virgilio.it
Fri Dec 3 04:43:47 PST 2021
Hello everybody,
My question is about the GetFeatureInfo request and how to get the related tilmestep in the response.
In my mapfile I have
LAYER
...
"wms_timeitem" "time"
"wms_timeextent" "2021-11-19T06:00:00Z/2021-12-03T00:00:00Z/PT1H"
"wms_timeformat" "YYYY-MM-DDTHH:MM:SSZ”
...
TILEINDEX “..."
TILEITEM “..."
END
Then I have a .html template in order to customize the GetFeatureInfo, in particular something like
[resultset layer=layerName]
[feature ]
{
"type": "Feature",
"id": "layerName",
"geometry": {
"type": "Point",
"coordinates": [
[x],
[y]
]
},
"properties": {
"value":[value_0],
"time": "[time]",
"lon": [maplon],
"lat": [maplat],
"bbox": "[bbox]"
}
},
[/feature]
[/resultset]
Everything works fine, but I have a problem with the [time] field. In particular, if I send a request with more than one timestep (TIME=2021-11-26T00:00:00Z,2021-11-26T01:00:00Z), I don’t know how to print the information related to the current tilmestep. In fact the [time] attribute just print the same information I send in the request.
I mean, I would like to have as for the value_0, a “dynamic” field with the related tilmestep in order to know what timestep it corresponds to the printed value.
Something like
{"type": "Feature",
"id": “layerName",
"geometry": {
"type": "Point",
"coordinates": [
-2103938.4,
4664535.9
]
},
"properties": {
"value": 19.215765,
"time": "2021-11-26T00:00:00Z",
"lon": -18.878687,
"lat": 38.626836,
"bbox": "-9782979.368056435,2651593.0053237937,8424815.600622647,9441583.212393695"
}
},
{"type": "Feature",
"id": “layerName",
"geometry": {
"type": "Point",
"coordinates": [
-2103938.4,
4664535.9
]
},
"properties": {
"value": 26.384709,
"time": "2021-11-26T01:00:00Z",
"lon": -18.878687,
"lat": 38.626836,
"bbox": "-9782979.368056435,2651593.0053237937,8424815.600622647,9441583.212393695"
}
}
Hope I was clear with my request.
Thanks in advance,
Best Regards,
Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20211203/f5e85038/attachment.htm>
More information about the MapServer-users
mailing list