Hello,
<br><br>thanks for that, i'll give it a try or maybe I adjust it to add +X
<br>pixels to each side of this.extent for the intersect-check.
<br><br>J.Schumann
<br><br>Am 17.02.2010 22:27, schrieb Arnd Wippermann [via OSGeo.org]:
<div class='shrinkable-quote'><br>&gt; Hi,
<br>&gt; 
<br>&gt; I use externalGraphic as Image layer and had the same problem. The image
<br>&gt; vanished, when the point lie outside the view.
<br>&gt; 
<br>&gt; I have patched for this purpose the drawFeature function of renderer.js (as
<br>&gt; Andreas suggest). I add an attribute render=&quot;drawAlways&quot; to my feature(s)
<br>&gt; and in the patched function I test for the attribute.
<br>&gt; 
<br>&gt; It works perfect.
<br>&gt; 
<br>&gt; &nbsp; &nbsp; drawFeature: function(feature, style) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; if(style == null) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; style = feature.style;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; if (feature.geometry) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var bounds = feature.geometry.getBounds();
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(bounds) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!bounds.intersectsBounds(this.extent) &&
<br>&gt; (feature.attributes.render == &quot;undefined&quot; || feature.attributes.render !=
<br>&gt; &quot;drawAlways&quot;))
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {style={display:&quot;none&quot;};
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bounds.intersectsBounds(this.extent)) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; style = {display: &quot;none&quot;};
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var rendered = this.drawGeometry(feature.geometry, style,
<br>&gt; feature.id);
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(style.display != &quot;none&quot; && style.label && rendered !==
<br>&gt; false) {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.drawText(feature.id, style,
<br>&gt; feature.geometry.getCentroid());
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.removeText(feature.id);
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return rendered;
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; }
<br>&gt; &nbsp; &nbsp; },
<br>&gt; 
<br>&gt; <a href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphicOver" target="_top" rel="nofollow" link="external">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphicOver</a><br>&gt; lay/ExternalGraphicOverlay.asp
<br>&gt; The examples shows the use of externalGraphic as Image layer with the
<br>&gt; possibility to rotate an image.
<br>&gt; 
<br>&gt; Arnd
<br>&gt; 
<br>&gt; 
<br>&gt; 
<br>&gt; -----Ursprüngliche Nachricht-----
<br>&gt; Von: [hidden email]
<br>&gt; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=0" target="_top" rel="nofollow" link="external">http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=0</a>&gt;
<br>&gt; [mailto:[hidden email]
<br>&gt; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=1" target="_top" rel="nofollow" link="external">http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=1</a>&gt;] Im
<br>&gt; Auftrag von J.Schumann
<br>&gt; Gesendet: Mittwoch, 17. Februar 2010 17:24
<br>&gt; An: [hidden email]
<br>&gt; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=2" target="_top" rel="nofollow" link="external">http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=2</a>&gt;
<br>&gt; Betreff: [OpenLayers-Users] Keep Feature.Vector visible near the maps
<br>&gt; border
<br>&gt; 
<br>&gt; 
<br>&gt; Hi!
<br>&gt; 
<br>&gt; I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a
<br>&gt; StyleMap using an externalGraphic. This works good except the fact that the
<br>&gt; features dissappear to early near the map border, when the Point leaves the
<br>&gt; viewport. But I need the externalGraphic to stay visible for some more
<br>&gt; pixels even when the graphics center / the Geometry.Point leaves the
<br>&gt; map. Is
<br>&gt; there any threshold I can set for this purpose?
<br>&gt; 
<br>&gt; Best regards,
<br>&gt; J.Schumann
<br>&gt; -- 
<br>&gt; View this message in context:
<br>&gt; <a href="http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586" target="_top" rel="nofollow" link="external">http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586</a><br>&gt; 959p4586959.html
<br>&gt; Sent from the OpenLayers Users mailing list archive at Nabble.com.
<br>&gt; _______________________________________________
<br>&gt; Users mailing list
<br>&gt; [hidden email]
<br>&gt; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=3" target="_top" rel="nofollow" link="external">http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=3</a>&gt;
<br>&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>&gt; 
<br>&gt; _______________________________________________
<br>&gt; Users mailing list
<br>&gt; [hidden email]
<br>&gt; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=4" target="_top" rel="nofollow" link="external">http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4588629&i=4</a>&gt;
<br>&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>&gt; 
<br>&gt; 
<br>&gt; View message @
<br>&gt; <a href="http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4588629.html" target="_top" rel="nofollow" link="external">http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4588629.html</a><br>&gt; 
<br>&gt; To unsubscribe from Keep Feature.Vector visible near the maps border,
<br>&gt; click here
<br>&gt; &lt;<a target="_top" rel="nofollow" link="external">&lt;Link Removed&gt;</a>&gt;.
<br>&gt; 
<br>&gt; 
<br></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Keep-Feature-Vector-visible-near-the-maps-border-tp4586959p4588778.html">Re: Keep Feature.Vector visible near the maps border</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>