[OpenLayers-Users] Cluster Strategy and Google Layer

mippon smarty at programmer.net
Mon Nov 17 10:40:28 EST 2008


Have a look at this thread, 

http://www.nabble.com/forum/ViewPost.jtp?post=20371907&framed=y


Salvaro wrote:
> 
> 
> Hey,
> 
> I just added in Map Options the projection EPSG:900913.
> The Google layer is with the same parameters, and Vector Layer in options
> only receive an array with Fixed and Cluster Strategies.
> 
> MapOptions: numZoomLeves=19, projection=EPSG:900913,
> displayProjection=EPSG:4326 and the controls.
> Vector Layer: strategies=a strategies array.
> Google: projection=EPSG:900913, type=GMAPS, Bounds=-20037508.34,
> -20037508.34,20037508.34, 20037508.34,
> maxResolution=156543.0339F,sphericalMercator=true, units=m.
> 
> The problem only happens with Google Layer (as you can see above), in WMS
> (EPSG:4326) it works well.
> 
> Have no idea about what is happening.
> 
> Thanks, Eric!
> 
> 
> Eric Lemoine wrote:
>> 
>> Hi Salvaro. Please show us your new code. Eric
>> 
>> 2008/11/3, Salvaro <asufsc at gmail.com>:
>>>
>>> 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.
>>>
>>> _______________________________________________
>>> 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-tp1402961p1453785.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
> 
> 

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




More information about the Users mailing list