Openlayers | Cloudpopup

Asked

Viewed 88 times

2

I’m trying to do a popup using Openlayers (more specifically using Ol4jsf) but the add to popup use the direct jscript, and the popup gets out all the time. What’s the reason? imagem da Popup

Code used:

<m:script>
        var lonLat = new OpenLayers.LonLat(-47.89460,-22.00710).transform(
new OpenLayers.Projection("EPSG:4326"), 
new OpenLayers.Projection("EPSG:900913")
);

var popup = new OpenLayers.Popup.FramedCloud("Popup", 
        lonLat, null,
        'Texto', null,
        true
            );

        map.setCenter(lonLat, 18);
        map.addPopup(popup);  </m:script>
  • guy, possibly it’s CSS. I would kick some rule from your page interfering with the popup.

  • 1

    So, I got it Solved, I’m posting the solution, and it wasn’t xD CSS

1 answer

1

I was able to solve the problem by adding the Javascript code outside the OL4JSF :D tag, I took an example of the component and adapted, the strange thing that has that tag, was for all jscript in relation to the map to go there, but anyway

  • You can accept the answer there on the left side.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.