I just started working with OpenLayers because I want to include a map on my JSF page (.xhtml files). I want to use the same feature that is demonstrated in this example: http://openlayers.org/dev/examples/styles-context.html
I played with the code a little bit in the html example files that come with the .zip download.
When I copied the code into my JSF .xhtml page, the map appears but the markers are not displayed. Here is the example code:
and changed the markers from 50 random to 2 markers of the coordinates of London and Berlin. And the map was centered exactly to show them, but the markers are still not displayed. But that proves that the markers are read and loaded to the map correctly, just not displayed. If I do the same back in the example .html page the map is again centered properly and the markers are displayed.
I have uploaded the example .html file to my webapp and it works perfectly. So this seems to be the .xhtml issue...
Is it the problem of xhtml? How to fix this?
Using the google console tool I analysed the code that was generated and it turnes out that in the .xhtml page the radious is zero:
<circle id="OpenLayers.Geometry.Point_41" cx="483.55555555555566" cy="150.7555555555556" r="" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></circle>
Please notice that it's always r="" but why is that? The script code is IDENTICAL in both cases - one (.html) produces the right radios, the other(.xhtml) one doesn't...