[GIS] Openlayers Vector Layer Polygons not displaying properly with OSM

openlayers-2openstreetmappolygon

I have an Openlayers map displaying Acetate tiles in OSM, and I'm drawing polygon regions on a vector layer to represent the countries of the world. This works fine for the most part, however, there seems to be a problem with where the vector layer ends and it not repeating the regions. For example, here is the zoomed out view:

enter image description here

As you can see, the polygon ends/begins on the east side of Russia near Alaska. This looks okay in this view, but if you start navigating around, it starts to get confusing. As you can see in these two screenshots, parts of Europe or North America aren't showing even though I've drawn polygons over those regions. As you scroll to the left and right these regions will hide and show:

enter image description here

enter image description here

This is preventing me from being able to use OSM layers in general.

Best Answer

Munzilla, I feel compelled to question why you would create polygons for the world's countries. It's got to be a big performance hit.

If your reason is simply to style the OSM map there are better ways.

But please tell us what you're trying to achieve to better help you. I'm interested in your end result goal if you can share that with us.

Update

Based on your comment below have you considered using google map charts or Geochart?

Geochart is pretty cool for this type of stuff. You can build a map very quickly here: http://code.google.com/apis/ajax/playground/?type=visualization#geo_chart

Related Question