leaflet-plugins
leaflet-plugins copied to clipboard
problem with loading KML files in ios
i have made an app with ionic framework leaflet and KML and i have problem to load KML files in ios, in browser and android everything is OK.
do you have an idea why this happening?
Hi, I had a similar problem working with leaflet and Cordova in iOS. Did you find a solution? Thanks in advance.
for the ios i had to tranform kml files to geojson files and load them as geojson that was the only solution that i found
Thanks a lot, I will try that and let you know just for reference.
Kind regards,
--Dimitris Doukas
logo
Dr. Dimitris Doukas
General Manager Twin Net Information Systems Ltd
Mob: +30.6944.964310
Phone: +30.210.6857070, +30.210-6090451
Fax: +30.210.6857070
Web: http://www.twinnet.gr/ http://www.twinnet.gr
From: gchristakis [mailto:[email protected]] Sent: Monday, February 29, 2016 9:48 AM To: shramov/leaflet-plugins Cc: egmobile Subject: Re: [leaflet-plugins] problem with loading KML files in ios (#207)
for the ios i had to tranform kml files to geojson files and load them as geojson that was the only solution that i found
— Reply to this email directly or view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-190080303 . https://github.com/notifications/beacon/AQt_kWYgSiKdLUOpHJX3dVA9yLlgFihUks5pop2WgaJpZM4HCMni.gif
In IOS I have tried the following (and variations of that) with no success. The json file is valid I have checked it.
var myLayer = new L.GeoJSON().addTo(map);
myLayer.addData("file.geojson");
If you do have some suggestions, I would appreciate. Thanks in advance.
--Dimitris
From: gchristakis [mailto:[email protected]] Sent: Monday, February 29, 2016 9:48 AM To: shramov/leaflet-plugins Cc: egmobile Subject: Re: [leaflet-plugins] problem with loading KML files in ios (#207)
for the ios i had to tranform kml files to geojson files and load them as geojson that was the only solution that i found
— Reply to this email directly or view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-190080303 . https://github.com/notifications/beacon/AQt_kWYgSiKdLUOpHJX3dVA9yLlgFihUks5pop2WgaJpZM4HCMni.gif
You may need security settings to allow the app to fetch from external resources in iOS.
Regards,
Mich
Michiaki Tatsubori, PhD. IBM Research - Africa
Sent from my iPhone
On Mar 4, 2016, at 08:59, egmobile [email protected] wrote:
In IOS I have tried the following (and variations of that) with no success. The json file is valid I have checked it.
var myLayer = new L.GeoJSON().addTo(map);
myLayer.addData("file.geojson");
If you do have some suggestions, I would appreciate. Thanks in advance.
--Dimitris
From: gchristakis [mailto:[email protected]] Sent: Monday, February 29, 2016 9:48 AM To: shramov/leaflet-plugins Cc: egmobile Subject: Re: [leaflet-plugins] problem with loading KML files in ios (#207)
for the ios i had to tranform kml files to geojson files and load them as geojson that was the only solution that i found
― Reply to this email directly or view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-190080303 . https://github.com/notifications/beacon/AQt_kWYgSiKdLUOpHJX3dVA9yLlgFihUks5pop2WgaJpZM4HCMni.gif
― Reply to this email directly or view it on GitHub.
Thank you Mich, we will check that. Basically we use Cordova to generate the build and in Android we use the same Js code which works fine.
Regards,
--Dimitris Doukas
logo
Dr. Dimitris Doukas
General Manager Twin Net Information Systems Ltd
Mob: +30.6944.964310
Phone: +30.210.6857070, +30.210-6090451
Fax: +30.210.6857070
Web: http://www.twinnet.gr/ http://www.twinnet.gr
From: tatsubori [mailto:[email protected]] Sent: Friday, March 04, 2016 2:22 AM To: shramov/leaflet-plugins Cc: egmobile Subject: Re: [leaflet-plugins] problem with loading KML files in ios (#207)
You may need security settings to allow the app to fetch from external resources in iOS.
Regards,
Mich
Michiaki Tatsubori, PhD. IBM Research - Africa
Sent from my iPhone
On Mar 4, 2016, at 08:59, egmobile [email protected] wrote:
In IOS I have tried the following (and variations of that) with no success. The json file is valid I have checked it.
var myLayer = new L.GeoJSON().addTo(map);
myLayer.addData("file.geojson");
If you do have some suggestions, I would appreciate. Thanks in advance.
--Dimitris
From: gchristakis [mailto:[email protected]] Sent: Monday, February 29, 2016 9:48 AM To: shramov/leaflet-plugins Cc: egmobile Subject: Re: [leaflet-plugins] problem with loading KML files in ios (#207)
for the ios i had to tranform kml files to geojson files and load them as geojson that was the only solution that i found
― Reply to this email directly or view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-190080303 . https://github.com/notifications/beacon/AQt_kWYgSiKdLUOpHJX3dVA9yLlgFihUks5pop2WgaJpZM4HCMni.gif
― Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-192033789 . https://github.com/notifications/beacon/AQt_kRPUcoSuECTnQwd-_AKKLZHibLAZks5pp3sNgaJpZM4HCMni.gif
Some one solved this issue?
Hi, no, as far as I know. I have tried almost everything suggested with no success.
--Dimitris Doukas
From: cicerohellmann [mailto:[email protected]] Sent: Tuesday, May 31, 2016 9:12 PM To: shramov/leaflet-plugins Cc: egmobile; Comment Subject: Re: [shramov/leaflet-plugins] problem with loading KML files in ios (#207)
Some one solved this issue?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/shramov/leaflet-plugins/issues/207#issuecomment-222772706 , or mute the thread https://github.com/notifications/unsubscribe/AQt_kfhB9Iu8okpebkcqBhj_OM4Yl4Ofks5qHHnzgaJpZM4HCMni . https://github.com/notifications/beacon/AQt_kZUX8VvXq1i26lBGW8IAuLzS_tdfks5qHHnzgaJpZM4HCMni.gif
There goes my init function, the file that I'm using is just a kml file translated to geojson. If you need any further help, I can guide you. I'm also using this plugin: leaflet-ajax-gh-pages/leaflet.ajax.js
function initMap() {
var southWest = L.latLng(3.639518, -74.970703),
northEast = L.latLng(-35.643905, -32.607422),
bounds = L.latLngBounds(northEast, southWest);
map = new L.Map('map', {center: new L.LatLng(58.4, 43.0), zoom: 5, maxBounds: bounds});
var osm = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
});
map.addLayer(osm);
// Variable for your data
var geojsonData;
// Fetch the file
$.getJSON('kml/GeoJson.geojson', function (results) {
// Assign the results to the geojsonData variable
geojsonData = results;
L.geoJson(geojsonData).addTo(map);
});
getCheckPoints();
map.addLayer(markers);
map.locate();
userLocation = L.control.locate().addTo(map);
userLocation.start();
hideLoading();
// lc.stop(); }