Getting error importing CSV

New home Forums Pro Add-on Getting error importing CSV

Tagged: , ,

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #69844
    yolo5811
    Participant

    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.
    #69859
    Steven
    Moderator

    Hi 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 Beer

    #69865
    yolo5811
    Participant

    Thanks 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!

    #69866
    yolo5811
    Participant

    Attached is a new csv file, is this the correct format?

    Attachments:
    You must be logged in to view attached files.
    #69876
    Steven
    Moderator

    Hi 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 Beer

    #69887
    yolo5811
    Participant

    Thanks 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

    #69888
    yolo5811
    Participant

    Nevermind 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

    #69889
    yolo5811
    Participant

    Final 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, 7 months ago by yolo5811.
    #69891
    Steven
    Moderator

    Hi 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 Beer

    #69904
    yolo5811
    Participant

    Hi 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.
    #69906
    yolo5811
    Participant

    Like the defualt google maps look

    Attachments:
    You must be logged in to view attached files.
    #69908
    Steven
    Moderator

    Hi 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 Beer

    #69911
    yolo5811
    Participant

    Hi 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/

    #69921
    Steven
    Moderator

    Hi 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 Beer

    #70009
    proybb
    Participant

    Hello!

    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,
    Busayarin

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.