Hi,
is your map tiled? It seems to be your icon is pretty large, and if it
crosses the tile borders,
it simply won't be displayed as there is no guarantee the other half of it
will be painted
in the nearby tile because of conflict resolution.
If you don't care about conflict resolution, you can turn it off and allow
partial labels (a
feature appeared in 2.6.x I believe):
http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#conflictresolution
http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#partials
Cheers
Andrea
On Tue, Mar 24, 2015 at 10:30 PM, maw269 <[email protected]> wrote:
> I have GS 2.6.0. I have an SLD where I am trying to label bunch of weather
> conditions throughout 700 cities. I like how GS does not allow labels to
> conflict, but things are not working well. When I first open my OpenLayers
> 3
> Map, the graphic label (icons) show nicely:
>
> <http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapIcons.png>
>
> You can see all the black dots that don't have the graphic label.
> When I zoom in one level, the graphics are still there.
> When I zoom in one more level, and all subsequent levels, all the graphic
> labels disappear:
>
> <http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapNoIcons.png>
>
> I am using OpenLayers 3.0 and requesting a single image like this:
>
> var openWeatherMap = new ol.layer.Image({
> visible: false,
> refresh: true,
> extent: mapExtent,
> source: new ol.source.ImageWMS({
> 'crossOrigin':'anonymous',
> url: '
> https://myserver.com/geoserver-2.6.0/myworkspace/wms',
> params: {'LAYERS':
> 'feed_open_weather_map'},
> serverType: 'geoserver'
> })
> });
>
> I've tried a million combinations of OL3 and SLD options. Some work better
> than other, but I can't ever get the graphic labels to appear beyond the
> zoom I mentioned.
> My SLD looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <sld:StyledLayerDescriptor version="1.0.0"
> xsi:schemaLocation="http://www.opengis.net/sld
> StyledLayerDescriptor.xsd"
> xmlns="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:sld="http://www.opengis.net/sld">
> <sld:UserLayer>
> <sld:LayerFeatureConstraints>
> <sld:FeatureTypeConstraint/>
> </sld:LayerFeatureConstraints>
> <sld:UserStyle>
> <sld:Name>OWM Icons</sld:Name>
> <sld:FeatureTypeStyle>
> <sld:Rule>
> <sld:Name>OWM Icons</sld:Name>
> <sld:Title>OWM Icons</sld:Title>
> <ogc:Filter>
> <ogc:PropertyIsEqualTo>
> <ogc:PropertyName>active_internal</ogc:PropertyName>
> <ogc:Literal>true</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:Filter>
> <PointSymbolizer>
> <Graphic>
> <Mark>
>
> <WellKnownName>circle</WellKnownName>
> <Fill>
> <CssParameter
> name="fill">#000000</CssParameter>
> </Fill>
> </Mark>
> <Opacity>
> 0.1
> </Opacity>
> <Size>1</Size>
> </Graphic>
> </PointSymbolizer>
> <TextSymbolizer>
> <Label>
>
> </Label>
> <LabelPlacement>
> <PointPlacement>
> <AnchorPoint>
> <AnchorPointX>0.5</AnchorPointX>
> <AnchorPointY>0.5</AnchorPointY>
> </AnchorPoint>
> <Displacement>
> <DisplacementX>0</DisplacementX>
> <DisplacementY>0</DisplacementY>
> </Displacement>
> </PointPlacement>
> </LabelPlacement>
> <Fill>
> <CssParameter name="fill">#000000</CssParameter>
> </Fill>
> <sld:Graphic>
> <sld:ExternalGraphic>
> <sld:OnlineResource xlink:type="simple"
>
> xlink:href="http://openweathermap.org/img/w/${icon}.png"/>
> <sld:Format>image/png</sld:Format>
> </sld:ExternalGraphic>
> <sld:Size>50</sld:Size>
> </sld:Graphic>
> </TextSymbolizer>
> </sld:Rule>
> </sld:FeatureTypeStyle>
> </sld:UserStyle>
> </sld:UserLayer>
> </sld:StyledLayerDescriptor>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users