shramov / leaflet-plugins

Plugins for Leaflet library
http://psha.org.ru/b/leaflet-plugins.html
MIT License
722 stars 289 forks source link

kml layers not load on iis server #276

Closed MRSheikh closed 6 years ago

MRSheikh commented 6 years ago

hi i used kml.js and load layer file into my map but nothing happened. when i open kml.html on browser locally, kml layer show me right but when i open it in my iis site only base map shows !!!! plz help me.

brunob commented 6 years ago

plz help me

plz help us to help you by provding an url to your webpage :)

MRSheikh commented 6 years ago

are you kidding ??? kml.html is in source code example here!!!!! leaflet-plugin example: https://github.com/shramov/leaflet-plugins/tree/master/examples

brunob commented 6 years ago

are you kidding ???

Surely not, it works well for me (and many other people). Give us some infos about your bug, and we may help you.

MRSheikh commented 6 years ago

sorry. i think your kml layer not load local files correctly. I only web share your example folder on iis 7.5 and open http://localhost/kml.html page on firefox 60 . but only base map showed for me and kml layer not loaded. thanks.

brunob commented 6 years ago

Sorry but without an online page showing your bug, i can't guess waht is your configuration problem, so give us a link or have a look in your browser debug tools.

MRSheikh commented 6 years ago

OK. I uploaded files on the web: KML Test this address contains all files in examples folder of your codes, except "default.htm"l is correspondent to "KML.html " the Issue is : only base map shows and kml layer not loaded.

brunob commented 6 years ago

Hum...

map = new OpenLayers.Map("mapdiv");

So you are trying to use a leaflet plugin with openlayers ?

Plus the fact that you doesn't seem to have looked at your browser console showing this error :

Blocage d’une requête multiorigines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://toplane-sa.co.ba/mapa/Toplane.kml. Raison : l’en-tête CORS « Access-Control-Allow-Origin » est manquant.

Since i'm a nice guy, i've downloaded your kml and tested it with the example file available in this repo, and it works. I think we can close this issue now.

MRSheikh commented 6 years ago

sorry. i edited my site root to reference "default.html" here is my link: KML Test. thanks

brunob commented 6 years ago

Please have a look to your dev console...

http://www.dreamytools.somee.com/KML_Samples.kml => 404

MRSheikh commented 6 years ago

i correct MIME types of my host, so below links is kml file and my page: KML Page KML file

MRSheikh commented 6 years ago

i correct MIME types of my host, so below links is kml file and my page: KML Page http://www.dreamytools.somee.com/default.html KML file http://www.dreamytools.somee.com/Dadsara-Zones.kml

On Tue, Aug 28, 2018 at 1:31 PM b_b notifications@github.com wrote:

Please have a look to your dev console...

http://www.dreamytools.somee.com/KML_Samples.kml => 404

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shramov/leaflet-plugins/issues/276#issuecomment-416506996, or mute the thread https://github.com/notifications/unsubscribe-auth/ARCpbreiP3tcYkjEGZYk4WJ3Vkmdp5hcks5uVQcDgaJpZM4V_Tlj .

brunob commented 6 years ago
HTTP/1.1 406 Not Acceptable
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Fri, 31 Aug 2018 08:58:03 GMT
Content-Length: 4942
Connection: keep-alive

Please, make sure you set all this correctly before posting, issues should be used for declaring bugs not like a support forum.