[OSM-dev] Label font scaling
Lynn W. Deffenbaugh (Mr)
ldeffenb at homeside.to
Fri May 31 18:13:31 UTC 2013
Ok, that's a good step in the right direction. But since I stated that
I'm using mod_tile/renderd, how does one configure things to use that?
I see that mod_tile's renderd.py invokes mapnik.render(), but without
the 3rd argument which is the scale factor. Or is there a new version
of mod_tile that I need to pick up? Checking further reveals that
gen_tile..cpp invokes agg_renderer, but again without that optional 3rd
parameter of the scale factor.
I don't know which of these two modules is actually invoked by apache
when tiles are requested, but since neither one does scale_factor, this
looks like a mapnik feature that's not yet used by mod_tile/renderd?
Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32
On 5/31/2013 12:47 PM, Dane Springmeyer wrote:
> Mapnik supports an optional `scale_factor` argument for rendering that
> enables the 2x scale up (or any variable size) without any
> modifications to your stylesheet.
>
> See documentation at https://github.com/mapnik/mapnik/wiki/Scale-factor
>
> Dane
>
> On May 31, 2013, at 8:12 AM, Lynn W. Deffenbaugh (Mr)
> <ldeffenb at homeside.to <mailto:ldeffenb at homeside.to>> wrote:
>
>> I'm running my own Tile Server (mod_tile/renderd created from
>> packages as described at
>> http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/
>> and would like to serve up a new set of tiles with larger font sizes
>> for higher resolution displays.
>>
>> I read
>> https://help.openstreetmap.org/questions/8467/font-size-and-adding-scale-to-map
>> which describes the textsymbolizer element in osm.xml, to whit:
>>
>>> <https://help.openstreetmap.org/vote/8472/up/>
>>> 3
>>> <https://help.openstreetmap.org/vote/8472/down/>
>>>
>>>
>>> The font size comes from the style file /osm.xml/. This includes
>>> several lines on the form "/|<textsymbolizer name="name"
>>> fontset_name="bold-fonts" size="11"/>|/". You can edit the /size/
>>> parameter in the wanted areas to generate a new style with other
>>> font sizes.
>>>
>>
>> But there's a TON of textsymbolizer's that would need to be edited.
>> Cloudmade's tile servers support an embedded doubler in their tile
>> URL as described at
>> http://developers.cloudmade.com/projects/tiles/documents
>>
>>> To get double resolution tiles use *@2x* suffix: 997 at 2x - this will
>>> improve map look for iPhone 4, Motorola Milestone, etc.
>>
>> Does anyone know how they do that? Is there a way to replace the
>> textsymbolizer element size attributes with a variable (say Size11,
>> Size8, SizeN) so that I can simply clone the style and edit all of
>> the sizes in a single place? Then I could do a 1.5, 2, 4, or
>> whatever by simply editing the sizes where the variables are declared
>> instead of every single textsymbolizer element.
>>
>> Any/all help would be appreciated to accomplish label font scaling in
>> the rendering chain with minimal manual editing work for each scale
>> that I support.
>>
>> Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32
>>
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org <mailto:dev at openstreetmap.org>
>> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20130531/e73f137b/attachment.html>
More information about the dev
mailing list