[OpenLayers-Users] Proportional Symbol Mapping
Bjorn Sandvik
B.Sandvik at sms.ed.ac.uk
Sat Apr 5 16:52:29 EDT 2008
Correct url:
http://thematicmapping.org/experiments/openlayers/propsymbols.html
(Event handler not working)
Bjorn
Bjorn Sandvik wrote:
> Hi Matt,
>
> I'm currently implementing your suggestions. I'm able to size the
> symbols as a function of the initial zoom level, but I can't figure out
> how to attach an event handler to the endzoom event. How can I add an
> event handler which makes a function call?
>
> http://localhost/thematicmapping/experiments/openlayers/propsymbols.html
> (the hover effect still needs some improvements).
>
> Bjorn
> http://blog.thematicmapping.org
>
>
> mpriour wrote:
>
>> Bjorn
>> The correct way to handle this is to attach an event handler to the endzoom
>> event.
>> This event should manage the size of the symbols so that they are
>> propotionally sized.
>> Choose the zoom level at which the symbol renders at the right proportion,
>> this will be your refernece zoom level. Then size the symbol propotionally
>> the ratio of resolution @ current zoom level / resolution @ reference zoom
>> level. Depending on the event firing order, you may also need to call
>> redraw() on your vector layer.
>> Matt
>>
>> Bjorn Sandvik wrote:
>>
>>
>>> Hi,
>>>
>>> I'm currently testing the capabilities of doing thematic mapping with
>>> OpenLayers.
>>>
>>> This is a proportional symbol map based on GeoJSON encoded data:
>>> http://thematicmapping.org/experiments/openlayers_propsymb.htm
>>>
>>> My question: Is there a way to keep the relative size of the symbols
>>> when the users zoom in/out?
>>> (symbols should keep their size relative to the size of the countries).
>>>
>>> Bjorn
>>>
>>> http://blog.thematicmapping.org
>>>
>>>
>>>
>>>
>>> --
>>> The University of Edinburgh is a charitable body, registered in
>>> Scotland, with registration number SC005336.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>
>>
>
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Users
mailing list