Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kml layers not load on iis server #276

Closed
MRSheikh opened this issue Aug 16, 2018 · 12 comments
Closed

kml layers not load on iis server #276

MRSheikh opened this issue Aug 16, 2018 · 12 comments
Labels

Comments

@MRSheikh
Copy link

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
Copy link
Collaborator

brunob commented Aug 16, 2018

plz help me

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

@MRSheikh
Copy link
Author

MRSheikh commented Aug 18, 2018

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

@brunob
Copy link
Collaborator

brunob commented Aug 19, 2018

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
Copy link
Author

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
Copy link
Collaborator

brunob commented Aug 20, 2018

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
Copy link
Author

MRSheikh commented Aug 21, 2018

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
Copy link
Collaborator

brunob commented Aug 21, 2018

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.

@brunob brunob closed this as completed Aug 21, 2018
@MRSheikh
Copy link
Author

MRSheikh commented Aug 25, 2018

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

@brunob
Copy link
Collaborator

brunob commented Aug 28, 2018

Please have a look to your dev console...

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

@MRSheikh
Copy link
Author

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

@MRSheikh
Copy link
Author

MRSheikh commented Aug 31, 2018 via email

@brunob
Copy link
Collaborator

brunob commented Aug 31, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants