Geocoding Address Line 1 , Address Line 2 Not Appearing

Home Forums MapPress Support Geocoding Address Line 1 , Address Line 2 Not Appearing

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13289
    dan1
    Participant

    Most of my customers use basic addresses:
    1030 Nice Street
    City, State Zip

    But – Some use addresses like:
    1030 Nice Street
    Route 221
    City, State Zip

    In the Geocode section of the control panel, if I assign

    “Address Line 1” to meta_data “1030 Nice Street”
    &
    “Address Line 2” to meta_data “Route 221”

    Neither addresses are appearing on the map and the location of the marker is incorrect.

    If the address does not include an “Address Line 2”, everything works perfectly.

    Is there a way to include a second part of an address such as a Route or Highway or whatever?

    Screenshots:
    Map without a second address line

    Map with a second address line

    Geocoding settings

    Any ideas?

    #13290
    Chris
    Keymaster

    Hi,

    What is the actual address you were trying to use in example #2? Does Google accept it if you enter it at maps.google.com?

    MapPress concatenates the address parts together using a comma between each part, so for the example you would end up with “1030 Nice St, Route 221, City, State, Zip” (or whatever is actually being used).

    However, that doesn’t mean Google will accept the address. It allows apartments i.e. “1030 Nice St, Apt 1234” but it seems fussy about other strings.

    If that’s the problem, maybe you could enter the address without “route” but include the full address in the POI body text for your readers.

    #13291
    dan1
    Participant

    Thanks Chris & bitchin plugin, just what I was looking for.

    The problem address is this. But I have a lot of other addresses that use a similar layout:

    620 Pulaski Highway
    Route 40
    Bear, Delaware 19701

    Yes, maps.google.com accepts it – Here

    On my live site the address works using an older version of google maps. Also by concatenating the address with a comma.

    
    ID, $prefix . 'ad1', true)) . '+'			                        .urlencode(get_post_meta($post->ID, $prefix . 'ad2', true)) . '+'			                        .urlencode(get_post_meta($post->ID, $prefix . 'city', true)) . '+'			                        .urlencode(get_post_meta($post->ID, $prefix . 'state', true)) . '+'			                        .urlencode(get_post_meta($post->ID, $prefix . 'zip', true));?>" target="_blank">
    

    Here is the live site link

    Thanks for the help.

    #13292
    dan1
    Participant

    The link I copy & pasted from maps.google.com is not correct. A comma between the Highway and Route seems to fix it.

    #13296
    Chris
    Keymaster

    Hi,

    I see the problem. When Google is able to geocode a result, you’ll see a single marker for the street address. Try it with “620 Pulaski Highway, Bear, Delaware, 19701”.

    When it can’t geocode the address, Google shows a list of businesses that might match from Google Places. That’s what you’re seeing with “620 Pulaski Highway, Route 40, Bear, Delaware, 19701

    MapPress uses the Google geocoding service (not Places) and it needs to have at least one match through that service. You can test the geocoder directly using this url.

    The result is approximate, for “Bear, DE” which is what you see in MapPress.

    I see the “Powersports” business on Google shows without the “route 40” but they include it on their web site. If the “route 40” part is valid, Google has a service where you can notify them of errors and get them fixed (click ‘report a problem’ in the bottom-right corner of any map).

    If you have a lot of errors of this kind, I don’t think there’s an easy answer. You can fix the addresses, or possibly find another geocoder that is more lenient. MapPress supports Nominatim, but it’s not very accurate. There are also some other paid and free geocoding services.

    #13297
    dan1
    Participant

    I see…

    Google seems to have a tough time with routes, highways, and other “non-standard” addresses. I suppose that’s why using lat & lng is best and more accurate.

    Thanks again for looking at.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.