Home › Forums › MapPress Support › Geocoding Address Line 1 , Address Line 2 Not Appearing
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by
dan1.
-
AuthorPosts
-
September 5, 2013 at 12:00 pm #13289
dan1
ParticipantMost of my customers use basic addresses:
1030 Nice Street
City, State ZipBut – Some use addresses like:
1030 Nice Street
Route 221
City, State ZipIn 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?
September 5, 2013 at 12:10 pm #13290Chris
KeymasterHi,
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.
September 5, 2013 at 1:35 pm #13291dan1
ParticipantThanks 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 19701Yes, 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">
Thanks for the help.
September 5, 2013 at 1:48 pm #13292dan1
ParticipantThe link I copy & pasted from maps.google.com is not correct. A comma between the Highway and Route seems to fix it.
September 6, 2013 at 6:15 am #13296Chris
KeymasterHi,
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.
September 6, 2013 at 7:12 am #13297dan1
ParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.