Update geoJSON_export.lua
This commit is contained in:
@@ -147,11 +147,11 @@ local function create_geoJSON_file(storage, image_table, extra_data)
|
|||||||
"features": [
|
"features": [
|
||||||
]]
|
]]
|
||||||
|
|
||||||
for image,exported_image in pairs(image_table) do
|
for exported_image,image in pairs(image_table) do
|
||||||
filename = string.upper(string.gsub(image.filename,"%.", "_"))
|
filename = string.upper(string.gsub(exported_image.filename,"%.", "_"))
|
||||||
|
|
||||||
if ((image.longitude and image.latitude) and
|
if ((exported_image.longitude and exported_image.latitude) and
|
||||||
(image.longitude ~= 0 and image.latitude ~= 90) -- Sometimes the north-pole but most likely just wrong data
|
(exported_image.longitude ~= 0 and exported_image.latitude ~= 90) -- Sometimes the north-pole but most likely just wrong data
|
||||||
) then
|
) then
|
||||||
geoJSON_file = geoJSON_file..
|
geoJSON_file = geoJSON_file..
|
||||||
[[ {
|
[[ {
|
||||||
@@ -159,12 +159,12 @@ local function create_geoJSON_file(storage, image_table, extra_data)
|
|||||||
"geometry": {
|
"geometry": {
|
||||||
"type": "Point",
|
"type": "Point",
|
||||||
]]
|
]]
|
||||||
geoJSON_file = geoJSON_file.." \"coordinates\": ["..string.gsub(tostring(image.longitude),",", ".")..","..string.gsub(tostring(image.latitude),",", ".").."]\n"
|
geoJSON_file = geoJSON_file.." \"coordinates\": ["..string.gsub(tostring(exported_image.longitude),",", ".")..","..string.gsub(tostring(exported_image.latitude),",", ".").."]\n"
|
||||||
geoJSON_file = geoJSON_file..
|
geoJSON_file = geoJSON_file..
|
||||||
[[ },
|
[[ },
|
||||||
"properties": {
|
"properties": {
|
||||||
"title": "]]..image.title..[[",
|
"title": "]]..exported_image.title..[[",
|
||||||
"description": "]]..image.description..[[",
|
"description": "]]..exported_image.description..[[",
|
||||||
"image": "]]..imageFoldername..filename..[[.jpg",
|
"image": "]]..imageFoldername..filename..[[.jpg",
|
||||||
"icon": {
|
"icon": {
|
||||||
"iconUrl": "]]..imageFoldername.."thumb_"..filename..[[.jpg",
|
"iconUrl": "]]..imageFoldername.."thumb_"..filename..[[.jpg",
|
||||||
|
|||||||
Reference in New Issue
Block a user