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>> Hi,
<br>>
<br>> I use externalGraphic as Image layer and had the same problem. The image
<br>> vanished, when the point lie outside the view.
<br>>
<br>> I have patched for this purpose the drawFeature function of renderer.js (as
<br>> Andreas suggest). I add an attribute render="drawAlways" to my feature(s)
<br>> and in the patched function I test for the attribute.
<br>>
<br>> It works perfect.
<br>>
<br>> drawFeature: function(feature, style) {
<br>> if(style == null) {
<br>> style = feature.style;
<br>> }
<br>> if (feature.geometry) {
<br>> var bounds = feature.geometry.getBounds();
<br>> if(bounds) {
<br>> if(!bounds.intersectsBounds(this.extent) &&
<br>> (feature.attributes.render == "undefined" || feature.attributes.render !=
<br>> "drawAlways"))
<br>> {style={display:"none"};
<br>> }
<br>> /*
<br>> if (!bounds.intersectsBounds(this.extent)) {
<br>> style = {display: "none"};
<br>> }
<br>> */
<br>> var rendered = this.drawGeometry(feature.geometry, style,
<br>> feature.id);
<br>> if(style.display != "none" && style.label && rendered !==
<br>> false) {
<br>> this.drawText(feature.id, style,
<br>> feature.geometry.getCentroid());
<br>> } else {
<br>> this.removeText(feature.id);
<br>> }
<br>> return rendered;
<br>> }
<br>> }
<br>> },
<br>>
<br>> <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>> lay/ExternalGraphicOverlay.asp
<br>> The examples shows the use of externalGraphic as Image layer with the
<br>> possibility to rotate an image.
<br>>
<br>> Arnd
<br>>
<br>>
<br>>
<br>> -----Ursprüngliche Nachricht-----
<br>> Von: [hidden email]
<br>> <<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>>
<br>> [mailto:[hidden email]
<br>> <<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>>] Im
<br>> Auftrag von J.Schumann
<br>> Gesendet: Mittwoch, 17. Februar 2010 17:24
<br>> An: [hidden email]
<br>> <<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>>
<br>> Betreff: [OpenLayers-Users] Keep Feature.Vector visible near the maps
<br>> border
<br>>
<br>>
<br>> Hi!
<br>>
<br>> I'm using OpenLayers.Feature.Vector with OpenLayers.Geometry.Point and a
<br>> StyleMap using an externalGraphic. This works good except the fact that the
<br>> features dissappear to early near the map border, when the Point leaves the
<br>> viewport. But I need the externalGraphic to stay visible for some more
<br>> pixels even when the graphics center / the Geometry.Point leaves the
<br>> map. Is
<br>> there any threshold I can set for this purpose?
<br>>
<br>> Best regards,
<br>> J.Schumann
<br>> --
<br>> View this message in context:
<br>> <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>> 959p4586959.html
<br>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
<br>> _______________________________________________
<br>> Users mailing list
<br>> [hidden email]
<br>> <<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>>
<br>> <a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>>
<br>> _______________________________________________
<br>> Users mailing list
<br>> [hidden email]
<br>> <<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>>
<br>> <a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow" link="external">http://openlayers.org/mailman/listinfo/users</a><br>>
<br>>
<br>> View message @
<br>> <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>>
<br>> To unsubscribe from Keep Feature.Vector visible near the maps border,
<br>> click here
<br>> <<a target="_top" rel="nofollow" link="external"><Link Removed></a>>.
<br>>
<br>>
<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>