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

GeoJSON + your sample not working

2 Answers 59 Views
Map
This is a migrated thread and some comments may be shown as answers.
Naografix
Top achievements
Rank 1
Naografix asked on 08 Jan 2015, 10:22 AM
Hello,


I have a problem with my binding GeoJSON, indeed I followed your tutorial and your documentation, but nothing works. It's been 2 days since I test and I don't understand where is my error. Same with your sample (live-demo)

Can you help me? Here is my code: http://puu.sh/eepPn/4e9c502a49.png

Here is the result: http://puu.sh/eepUv/ad556aeae5.png

Plz help me !


2 Answers, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 09 Jan 2015, 09:32 AM
Hello,

I see referencing the *.json file as script, but this is not a JavaScript file, and therefore I suggest removing this line:
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="contries.json"></asp:ScriptReference>

Moreover, this file is not part of the Telerik.Web.UI assembly.

To further investigate, you can check the browser console for errors. Note that if you are running the application with IIS 7.5 or less, a mime type for json files should be added in the web.config. You can find more relevant details about this in this Stackoverflow forum thread.

Regards,
Ianko
Telerik
0
Naografix
Top achievements
Rank 1
answered on 09 Jan 2015, 10:48 AM
Hey,

And this :

<system.webServer>
    <staticContent>
      <remove fileExtension=".json" />
      <mimeMap fileExtension=".json" mimeType="application/json" />
    </staticContent>
</system.webServer>

In Web.config :)

Thx !
Tags
Map
Asked by
Naografix
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Naografix
Top achievements
Rank 1
Share this question
or