mmmm for each marker i asked but every answer is false.... maybe a have
someting wrong?

code:

marker_pp = new OpenLayers.Marker(new OpenLayers.LonLat(lon, lat),icon);
ME_cont=AM_marcadores_arr.length;
(i save every object)
AM_marcadores_arr[ME_cont]=marker_pp;

then....

i ask for every object marker

AM_bounds=map.getExtent();
for()
{
alert(AM_bounds.contains(AM_marcadores_arr[ME_i])); (return false :/)
}


2010/10/19 Moataz Elmasry <[email protected]>

> Yes exactly, map.getExtent() or max.getMaxExtent()
> and before calling contains() make sure that both bounds and marker x y
> have the same projection, otherwise you have to transform
>
> Good luck
>
> Valeria Muñoz wrote:
>
>> thanks!...
>>
>> what bounds? ...map.getExtent()?
>>
>> RG
>>
>> 2010/10/19 Moataz Elmasry <[email protected] <mailto:
>> [email protected]>>
>>
>>
>>    I'd get the list of markers and map viewport, say called bounds
>>    and for each marker call
>>
>>    if (bounds.contains(marker))
>>
>>    Valeria Muñoz wrote:
>>
>>        Hi
>>
>>        I have a map and i assign a lot of markers, how can I know if
>>        all markers are displaying in the current map view?.. Can I?
>>
>>        RG
>>
>>  ------------------------------------------------------------------------
>>
>>        _______________________________________________
>>        Users mailing list
>>        [email protected] <mailto:[email protected]>
>>
>>        http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>>
>>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to