Using OpenLayers, I added a WFS layer (on GeoServer) with a filter that returns all features (black) that intersect my polygon (yellow) placed over some Latin American countries within certain dates.
However, the feature that crosses horizontally across the map does NOT actually intersect my polygon. This feature is somewhere in the pacific ocean between Hawaii and Fiji and NOT in Latin America. The problem is that instead of crossing the International Date Line it is being rendered on the map by wrapping around the whole world.
The problamatic feature is defined:
POLYGON((-179.700417 14.202717,-178.687422 13.992875,179.024138 8.24716,-179.98241 8.035567,-179.700417 14.202717))
I have many of problematic date line features like this but have narrowed it down to this one for this example. I can't just ignore it in my application because i have many of them.
I've tried using "wrapDateLine: true" in base layer and WFS layer with same results.
Not sure if this would be a GeoServer problem or an OpenLayer problem.
Does anyone know a solution to my international date line problem?