[OpenLayers-Users] Vector layer with dinamic data

Andreas Hocevar ahocevar at opengeo.org
Tue Jun 30 18:04:50 EDT 2009


Adrian Popa wrote:
> Hello,
>
> I'm trying to accomplish the same thing and I followed your advice -
> using vector + BBOX, but I hit a snag - because my POI layer has a lot
> of elements, I would like to enable this layer only for a certain zoom
> level (when the user is really close). Is there some standard
> functionality for a layer - making it visible (and doing the queries)
> only from a zoom level onwards?

That would be layer.minResolution and layer.maxResolution.

Regards,
Andreas.
>
> If I try to fix things server-side (not returning anything if the zoom
> is to low), openlayers will not query again because the zoomed BBOX is
> included in the original BBOX and it thinks nothing changed...
>
> Thanks,
> Adrian
>
> Andreas Hocevar wrote:
>> Hi,
>>
>> this answer Eric gave to a similar thread in January should get you there:
>> http://openlayers.org/pipermail/users/2009-January/009709.html
>>
>> Regards,
>> Andreas.
>>
>> On Mon, Jun 29, 2009 at 8:42 AM, Alexandru
>> IOVANOVICI<iovanalex at gmail.com> wrote:
>>   
>>> Hello,
>>>
>>> I'm working on a application in wich i have some vector data (a kml file
>>> with paths) wich i have to display over a map. I have the data in a database
>>> and i can create the kml on-the-fly with a php script, based on some url GET
>>> params. I want the create a kml file wich contains only the lines wich are
>>> in the current viewport and at a level of detail depending on the zoom
>>> level. So, when the user pans the map i shoud update the kml file and
>>> display the new data. Same thing when the user zooms the map. My PHP script
>>> and kml file are tested and working ok.
>>> The problem is how do i code the javascript for this layer. For a similar
>>> POI layer i used the instructions from here
>>> http://wiki.openstreetmap.org/wiki/OpenLayers_Dynamic_POI and it is ok. But
>>> in this case i have no getUrl arg to the constructor.
>>> How can be done this ... because i'm sure there is a solution ...
>>>
>>> Thank you,
>>>
>>> Alexandru IOVANOVICI
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>     
>>
>>
>>
>>   
>


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list