mstahv / v-leaflet

Leaflet add-on for Vaadin
Other
43 stars 38 forks source link

LPolygon don't show up #152

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello,

I want add simple polygon. I try example from: this I write some code:

        LMap map = new LMap();
        map.addBaseLayer(new LOpenStreetMapLayer(), "CloudMade");
        map.setCenter(60.455, 22.300);
        map.setZoomLevel(18);

        LPolygon leafletPolygon = new LPolygon(new Point(60.455, 22.300),
                new Point(60.456, 22.302), new Point(60.50, 22.308));
        leafletPolygon.setColor("#FF00FF");
        leafletPolygon.setFill(true);
        leafletPolygon.setFillColor("#00FF00");
        map.addComponent(leafletPolygon);
        map.addLayer(leafletPolygon);
        setContent(map);

but LPolygon not exist in my map. Please help :)

ghost commented 7 years ago

Please answer me, i realny need help

elmot commented 7 years ago

That works for me.

ghost commented 7 years ago

Do you show mi print screen, plz?

ghost commented 7 years ago

I try run code from "PolygonWithHolesTest". But lPolygon no show up on the map :( Try by firefox, chrome and edge

ghost commented 7 years ago

I find reason. This library have regression. LPolygon work for v-leaflet 0.6.0 (And lower). All later versions don't how up LPolygon on map.

mstahv commented 7 years ago

Which version are you using?

mstahv commented 7 years ago

The PolygonWithHolesTest works fine for me. Did you get some error on browser? Errors on console?

ghost commented 7 years ago

I use the latest V-Leaflet » 2.0.0 and last Vaadin v8.0.5 + integrated with Spring Boot v1.5.3 I don't get any errors. All ok, but on map i don't get any polygon. Maybe U upload empty client project (based on the latest versions of library) with one example polygon ?

ghost commented 7 years ago

I share my project in thos place: https://github.com/pkosciej/vaadin-polygon-test code result image: https://github.com/pkosciej/vaadin-polygon-test/blob/master/src/main/resources/result.png

mstahv commented 7 years ago

I tried your project and it worked just fine for me:

screen shot 2017-05-10 at 22 20 18

Which browser are you using? Maybe there is a specific issue to your platform?

basisbit commented 7 years ago

also works fine here