How to zoom on a little shape on a kendomap ?

1 Answer 12 Views
Map
Blanche
Top achievements
Rank 1
Blanche asked on 08 Jul 2021, 10:25 AM

I created a kendo map and i'm using a openstreetmap, I also created a layer shape polygon with my coordinates but when I zoom, my shape disappears and I don't know why.

Maybe it is because my shape is not very large (about 1hectare).

I tried with more coordinates (about 100) but it is the same thing.

Should i change the map or just kendo can't zoom on little shape ?

This is my map with zoom 13 :

And with zoom 14, my shape disappears.

My code :

<script>
    $("#map").kendoMap({
   
             center: [48.471504, - 2.457585],
                zoom: 13,
                layers: [{
                    type: "tile",
                   urlTemplate: "http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
            subdomains: ["a", "b", "c"]
                }, {
                    extent: [
                        48.499924, - 2.459692,
                        48.45, -2.479
                    ],
                    minZoom: 11,
                    type: "shape",
                    style: {
                        fill: {
                            opacity: 0
                        },
                        stroke: {
                            color: "red",
                            width: 2
                        }
                    },
                    dataSource: {
                        type: "geojson",
                        data: [{
                            "type": "Polygon",
                            "coordinates": [[ listCoordinates                        
                            ]]
                        }]
                    }
                }]
            });
</script>

How can i zoom and see my shape ?

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 13 Jul 2021, 10:05 AM

Hi,

Everything looks correct. Please try removing the minZoom option from the settings and test again

Regards,
Angel Petrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Map
Asked by
Blanche
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or