New home › Forums › Pro Add-on › KML file import
- This topic has 20 replies, 3 voices, and was last updated 5 years, 3 months ago by Lee BASC.
-
AuthorPosts
-
November 28, 2017 at 4:52 pm #32511Lee BASCMember
Hi
Ive purchased the Pro version of the plugin and want to import some mapping data we have in KML format. The problem is the file is 96mb as it covers most of the country. We have been supplied the KML file by a third party. Is there a any advice you could give to be able to get the file to import?
If they can break the file down, is it possible to import multiple KML files onto one map? as a work around to file sizes?
Lee
November 29, 2017 at 11:17 am #32534SupportTeamModeratorHi Lee,
Thank you for getting in touch with us.
Unfortunately KML layers has some limitations as described here: https://developers.google.com/maps/documentation/javascript/kmllayer#restrictions
Could you upload KML file to pc cloud and share with us so we can figure out possible solutions? You can mark you response as private to protect your data.
Thank you for your time in this.
Best regards
November 29, 2017 at 11:36 am #32535Lee BASCMemberThis reply has been marked as private.November 29, 2017 at 2:49 pm #32542SupportTeamModeratorThis reply has been marked as private.November 29, 2017 at 3:55 pm #32549PerryModeratorHi there Lee,
My name is Perry, I’m one of the lead developers on WP Google Maps, pleased to meet you!
Jarek brought this to my attention earlier, I have a few suggestions.
96mb is an awful lot of KML data, you are aware of the bandwidth and performance impact this will have on your visitors correct?
There are two options here:
1) I can help you convert the KML file into a CSV of polygons, swapping the coordinates and formatting appropriately along the way, then passing you the resulting CSV for import. This can be done automatically, there’s no need to swap your coordinates by hand, that would takes months on a 96mb file!
Or
2) If you’re open to trying beta software, our upcoming release has the OpenStreetMap / OpenLayers engine built in, which also features a KML layer – off the top of my head I don’t think theirs is subject to the same size restrictions as Google (presumably they use a 3rd party KML renderer whereas Google’s actually transmits the KML data to Google servers, hence the restrictions). Please note that this engine has restrictions of it’s own (no directions box, no themes)
See here for more information on Googles KML layer limits:
https://developers.google.com/maps/documentation/javascript/kmllayer#restrictions
Please let me know if either of those sounds acceptable?
Kind regards
– PerryDecember 6, 2017 at 5:29 pm #32742Lee BASCMemberThis reply has been marked as private.December 7, 2017 at 10:11 am #32759PerryModeratorHi Lee
I tried that file out in v7 beta using the OpenStreetMap engine but nothing is displayed – I’m going to have to look further into this.
I also tried zipping the 4mb file to make a KMZ file and then using the Google engine, but nothing is displayed, I’m guessing this still doesn’t get past their restrictions.
I’ll go ahead and convert this data if you would like?
Purely out of curiosity, may I ask what this data displays? I was just wondering because some of the polygons are very close to where I live, I actually cycled past one of these areas not so long ago (near Glastonbury)!
Let me know how you’d like to proceed,
Kind regards
– PerryDecember 7, 2017 at 11:29 am #32762Lee BASCMemberThis reply has been marked as private.December 7, 2017 at 2:27 pm #32768PerryModeratorHi Lee,
I’m looking at your polygon data and potentially converting it and I notice that you have some polygons with inner boundaries (eg holes). Our plugin currently doesn’t support holes in polygons, will that be a problem?
Kind regards
– PerryDecember 21, 2017 at 12:39 pm #33206Lee BASCMemberHi
could you let me know one of the polygons that has a hole in so we can check against our information. If the holes are water areas then it wount be a problem.
Cheers
Lee
December 21, 2017 at 3:21 pm #33215PerryModeratorHi Lee
See the picture I’ve attached for an example, near Horton just outside the London ring road (West)
We do have plans to support polygons with holes in the future but at the moment there is no support for this.
If that’s a problem then I’m terribly sorry for the inconvenience.
Kind regards
– PerryJanuary 22, 2018 at 11:33 am #33961Lee BASCMemberHi
Ive spoken to my colleagues and they would like another (possibly) two examples of the polygons with holes that wont show. The reason is we may be able to go ahead with the entire area covered. But we would need to see a large hole in a polygon.
If you could send this that would be a great help
January 22, 2018 at 12:18 pm #33964PerryModeratorHi Lee
I didn’t see any in the smallest KML file,
In the 4.2mb file here are the polygons with holes:
– Weston Turville Reservoir
– Wraysbury No. 1 Gravel Pit
– West Pennine MoorsThere may be more in the 96mb file
Does that help?
Kind regards
– PerryMarch 19, 2018 at 1:18 pm #35815Lee BASCMemberHi Perry
sorry for a delay in getting back to you on this. Lots of people, having lots of input, Causing lots of probelms 🙂
Is it possible to convert the kmls so we can use them even though the holes arent included? We will put a disclaimer on the page explaining this.
If this could be done that would be brilliant.
Many tHanksLee
March 19, 2018 at 3:47 pm #35824PerryModeratorHi Lee
Yes we can do that certainly, I have code at my end to perform the conversion as long as you’re aware that holes aren’t supported at the moment.
Please send me your KML and I’ll get that converted as soon as possible.
Kind regards
– Perry -
AuthorPosts
- You must be logged in to reply to this topic.