New home › Forums › Pro Add-on › Getting error importing CSV
- This topic has 19 replies, 5 voices, and was last updated 1 month, 2 weeks ago by Matthew.
-
AuthorPosts
-
July 15, 2021 at 3:57 am #69844yolo5811Participant
I exported a google map from my google maps as a CSV. When trying to import the CSV data I keep getting
“Invalid latitude, supplied value is not numeric on row(s) 2 – 163”
“No longitude supplied, “Find longitude” not selected. Marker will have zero longitude on row(s) 2 – 163″
Attached is the CSV file I exported from google maps. Everything is default and did not change the cells after exporting the data.
Do I have to arrange the cells in a certain way so WP Maps can read it correctly? This is my first time.
Attachments:
You must be logged in to view attached files.July 15, 2021 at 11:44 am #69859StevenModeratorHi there,
Thank you so much for getting in touch, we really appreciate your time.
That is correct, you will need to adjust your current sheet to the format our plugin will accept which is detailed in the below documentation:
– https://www.wpgmaps.com/documentation/exporting-and-importing-your-markers/You should also be able to download an example CSV sheet from the above link.
You will kindly need to move the names, address, url into their corresponding as seen in the example.
You can kindly ignore the Geometry column found in your CSV sheet as this should not affect any data.
You may need to include a custom field to account for the phone field and to do so, simply add the following to the end of the header bar in the new CSV:
Custom Field: Phone
You can then add your fields phone numbers to this column.
Kindly let me know if this helps?
Kindest Regards,
Steven De BeerJuly 15, 2021 at 2:16 pm #69865yolo5811ParticipantThanks for the reply! Much appreciated.
Should I make a new CSV or can I use the example one and add my fields under the corresponding headers. Like in my Sheet I have “name” does that go under “title”? And do I leave “id” and “map_id” columns blank?
Thank you!
July 15, 2021 at 2:37 pm #69866yolo5811ParticipantAttached is a new csv file, is this the correct format?
Attachments:
You must be logged in to view attached files.July 15, 2021 at 3:55 pm #69876StevenModeratorHi again,
Thank you so much for getting back to me.
I took a look at the attached CSV and everything does seem to be in order.
Do ensure that all the markers are approved and set to 1, then depending on what other fields you are interested, you can adjust these.
On your import, kindly ensure you enable the Geocoding option as detailed in the documentation as your markers do not have their own latitudes and longitudes, meaning that they will require geocoding in order to generate these.
Kindest Regards,
Steven De BeerJuly 15, 2021 at 9:08 pm #69887yolo5811ParticipantThanks for the response Steven,
When trying to input I get this error
Request denied – This IP, site or mobile application is not authorized to use this API key. Request received from IP address 35.209.11.84, with referer: https://maps.googleapis.com/maps/api/geocode/json?xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(my api key)
I have tried changing the Application restrictions from HTTP to IP in google credentials
Any idea
July 15, 2021 at 9:37 pm #69888yolo5811ParticipantNevermind got it to work, Thank you.
Is there a way to make the custom fields show up without having to add code? By default the fields don’t show up window when clicking on a marker
July 15, 2021 at 10:36 pm #69889yolo5811ParticipantFinal question and I thin I will be all set. I got the custom fields to show up but how do I make them bold in the custom js
jQuery(function(){
jQuery(document.body).on(“infowindowopen.wpgmza”, function(e){
jQuery(“.wpgmza-infowindow p”).each(function(){
var customFieldTitle = jQuery(this).data(“custom-field-name”);
if(customFieldTitle){
jQuery(this).html(“” + customFieldTitle + “: ” + jQuery(this).text());
}
});
});jQuery(document).ready(function(){
jQuery(“.wpgmza_marker_holder th:nth-child(1)”).text(“Property”);
});
});- This reply was modified 2 years, 2 months ago by yolo5811.
July 16, 2021 at 7:05 am #69891StevenModeratorHi again,
Thank you so much for getting back to me.
Marker info windows will by default display its provided custom field unless the custom field has been set to hidden in the custom fields section.
Might I kindly suggest making use of custom CSS to adjust the text to bold instead?
Using the following should target the custom fields:
[data-custom-field-id] { font-weight: bold; } or [data-custom-field-name] { font-weight: bold; }
Kindly let me know if this helps?
Kindest Regards,
Steven De BeerJuly 16, 2021 at 2:51 pm #69904yolo5811ParticipantHi Steven,
The css works to make everything bold. I just want the title of the custom field to be bold not the text after the csutom field title. Not sure why the css makes the custom field title bold and the text after it bold?
-Z
Attachments:
You must be logged in to view attached files.July 16, 2021 at 3:12 pm #69906yolo5811ParticipantLike the defualt google maps look
Attachments:
You must be logged in to view attached files.July 16, 2021 at 3:16 pm #69908StevenModeratorHi again,
Thank you so much for getting back to me.
My apologies, I wasn’t aware you were attempting to add the custom field titles and make only the title bold.
Might I kindly ask if you would be able to provide me with a link to your map page?
This should allow me to take a closer look in order to try and target the added element.
I look forward to hearing back from you.
Kindest Regards,
Steven De BeerJuly 16, 2021 at 3:49 pm #69911yolo5811ParticipantHi Steven,
Here is the link to the page in question. There are a few different maps on the page we are palying around with. The one we are trying to sort out is the “Long Trail” map when you get to the page.
https://trekkerbox.com/drop-maps/
July 19, 2021 at 9:42 am #69921StevenModeratorHi Z,
Thank you so much for getting back to me.
I have taken a closer look and I believe you should simply be able to concatenate addition html tags into your jQuery like below:
jQuery(function(){ jQuery(document.body).on("infowindowopen.wpgmza", function(e){ jQuery(".wpgmza-infowindow p").each(function(){ var customFieldTitle = jQuery(this).data("custom-field-name"); if(customFieldTitle){ jQuery(this).html("<strong>" + customFieldTitle + "</strong>" + ":" + jQuery(this).text()); } }); }); jQuery(document).ready(function(){ jQuery(".wpgmza_marker_holder th:nth-child(1)").text("Property"); }); });
This should Make the “Title” appear as bold without affecting the whole custom field.
Kindly let me know if this helps?
Kindest Regards,
Steven De BeerJuly 26, 2021 at 7:14 pm #70009proybbParticipantHello!
I am facing the same problem with the ‘Cannot import line 1 as the LAT and/or LNG is not defined.’
So I clicked on ‘Beta: automatically geocode addresses to GPS co-ordinates if none are supplied’
The field for geolocation is not visible for me at all.
Thank you!
Best Regards,
BusayarinAttachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to reply to this topic.