This is a migrated thread and some comments may be shown as answers.

sample geojson file doesn't line up with Bing tiling

3 Answers 170 Views
Map
This is a migrated thread and some comments may be shown as answers.
Samantha
Top achievements
Rank 1
Samantha asked on 10 Jul 2014, 12:47 AM
I am trying to use the Kendo UI map with Bing tiles and also apply a layer of geojson (the countries sample provided). However, when I do this the polygons are not aligned on the map. How can I fix this? 
function createMap() {
    $("#map").kendoMap({
        center: [30.2681, -97.7448],
        zoom: 3,
        layers: [
            {
                type: "bing",
                key: "mybingkey"
            },
            {
                type: "shape",
                dataSource: {
                    type: "geojson",
                    transport: {
                        read: {
                            dataType: "jsonp",
                            url: "../geojson/countries-users.geo.js",
                            jsonpCallback: "loadCountries"
                        }
                    }
                },
                style: {
                    fill: {
                        opacity: 0.7
                    }
                }
            }
        ],
        shapeCreated: onShapeCreated,
        shapeMouseEnter: onShapeMouseEnter,
        shapeMouseLeave: onShapeMouseLeave
    });
}

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 11 Jul 2014, 03:19 PM
Hello,

I've tried this scenario, but it appears to work fine here:
http://trykendoui.telerik.com/Eriq

Can you spot any differences between my sample and your actual code?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Robert
Top achievements
Rank 1
answered on 25 Sep 2014, 09:36 PM
well many of your links are absolute rather than relative, but I don't think that's anything.  One thing I did notice is your reference to Bing.   Attached is the relevant code from the example files, and it has no such Bing reference.  Is that the issue?
0
T. Tsonev
Telerik team
answered on 29 Sep 2014, 08:36 AM
Hello,

The online demos indeed do not show both Bing and GeoJSON layers simultaneously.
Here's an updated demo with the latest Kendo UI version.

Can I help with anything specific?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Map
Asked by
Samantha
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Robert
Top achievements
Rank 1
Share this question
or