108 reputation
5
bio website
location
age
visits member for 2 years, 3 months
seen Jan 27 '13 at 23:16

Aug
2
comment Loading features incrementally in a vector layer
I see, so the extra step of declaring the format object with internal and external projections was only necessary because we are adding layers manually. If I understood correctly, in my original code that step was not necessary since when setting the projection property of the layer (with "projection: new OpenLayers.Projection("EPSG:4326")"), I am explicitly saying that the expected features are in the "EPSG:4326" projection, then behind the curtains those features will be transformed to the projection of the map ("EPSG:900913"), correct?
Aug
2
comment Loading features incrementally in a vector layer
Thanks for your answer @drnextgis!, one question about the projections: In my example, when I instantiated the vector layer, I added in its properties:"projection: new OpenLayers.Projection("EPSG:4326")" Is this correct considering it is loading OSM data?, or should I had specified the same projection I declared for the map (EPSG:900913)? or rather should I had declared the osm format object as you did in your example (specifying internal and external projections)?. Thanks for any clarification, the projection details are breaking my head now. By default the OSM data is in EPSG:4326, isn't it?
May
24
comment creating vector layer from OSM file using OpenLayers
hi @unicoletti, I have just added more details to my question, thanks for any feedback!
May
24
comment creating vector layer from OSM file using OpenLayers
thanks for your answer @unicoletti. The problem I see is that with this strategy the non-visible nodes will not be present at all. As far as I understand that create problems if I have "way" elements that reference them (but tell me please if that is not the case), so I cannot just drop them from the vector layer, but I should change their visibility only. Is there a way to do that ?. What I am trying to avoid is having a big mess of points representing nodes in my map, I do need all of them (for drawing the ways) but I do not want to see all the dots, but only certain of them.