[OpenLayers-Users] Cluster Strategy and Google Layer

Salvaro asufsc at gmail.com
Mon Nov 3 05:45:10 EST 2008


Hi Eric, thanks for your answer!

I set in the map this projection, but the problem still continues.
If the points are in the correct coordinates (reprojection), the cluster
strategy is ignored by the layer. 
Else if the points are in the incorrect coordinates the cluster aparently
works, but obviously all the points are in the center of the map.

I tried much things, but really have no idea about what it can be =/.

Thanks!

Using WMS in EPSG:4326 all works well.


Eric Lemoine wrote:
> 
> Hi. The EPSG:900913 projection should be set in the map options. In
> this way your vector layer is also a 900913-projected layer. If your
> vector points are expressed in 4326 you have to have them re-projected
> before the're added to the layer. Eric
> 
> 2008/10/31, Salvaro <asufsc at gmail.com>:
>>
>> I'm using a Vector Layer with Cluster Strategy (and Fixed) overlaying a
>> WMS
>> (EPSG:4326) and a Google Layer (EPSG:900913).
>>
>> In the WMS layer the strategy works perfectly. But in Google Layer, the
>> layer apparently ignores the Strategy.
>>
>> Testing I saw a "strange" thing, when I use the points in EPSG:4326
>> coordinates in the Google Layer and all points are in the centre of the
>> map,
>> looking the opacity is possible to see the points being "clustered". But
>> when I try to reproject them or just set different coordinates of the
>> google
>> projection, the layer ignores the cluster.
>>
>> The points with correct projection:
>> http://img225.imageshack.us/my.php?image=correctprojectionyx8.jpg
>>
>> And with the incorrect projection:
>> http://img404.imageshack.us/my.php?image=wrongprojectiontk6.jpg
>> http://img505.imageshack.us/my.php?image=wrongprojection2ty8.jpg
>>
>> I'm using in the Map these attributes: numZoomLevels=19,
>> displayProjection=EPSG:4326 and the controls.
>> In the layer: type=GMAPS, projection=EPSG:900913, maxExtent=-20037508.34,
>> -20037508.34, 	20037508.34, 20037508.34, units=m,
>> maxResolution=156543.0339F
>> and sphericalMercator=true.
>>
>> The points are being added using addFeatures.
>>
>>
>> Anyone have an idea about what it can be and how can I do the cluster
>> works
>> with the Google Layer?
>>
>> Thanks!
>> --
>> View this message in context:
>> http://n2.nabble.com/Cluster-Strategy-and-Google-Layer-tp1402961p1402961.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Cluster-Strategy-and-Google-Layer-tp1402961p1448871.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list