directoryfan
Forum Replies Created
-
AuthorPosts
-
February 19, 2018 at 2:13 pm in reply to: Understanding CPT search and CPT synchronization in the different GD sections #418244
Thank you Guust and it is OK, I understand.
In this case, I have to find a solution for the map. I don’t think that the visitors will intuitively change the CPT on the map. Maybe I’ll have to emphasize more the CPT menu on the map.
Thanks again, Marius
February 19, 2018 at 11:25 am in reply to: Understanding CPT search and CPT synchronization in the different GD sections #418224Thank you Guust for your time and explanation, but please answer this question:
1. Why does automatically change the Popular Categories under the search on the GD/Location Homepage? If someone is changing the CPT from Places to Events in the search and the Popular Categories get changed to Events too, but the map does not change to that CPT, is this not confusing for the users? (I see the new CPT Events and the updated Popular Categories, but still the Places on the map)
I would like to make the map on GD Homepage aware of the CPT change in the search, how and where can I do this? (Please consider, that GD Directory can be used also for local directories with just some CPTs and not just for big global directories with a lot of CPTs.)
And thank you for your hint, I will use more widgets for the CPT Events on the GD Homepage.
Greetings, Marius
February 19, 2018 at 11:12 am in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #418223Hi, I’m using Firefox and I saw this and asked myself if you get another response as the long string in your development environment. After spending some hours reading about Nominatim API and the German state Baden-Württemberg and testing different locations I know now better about the right name resolving.
OK, so the long string is in the JSON attribute display_name and the others attributes are splitted under the address attribute. And the other attributes are not for each OSM API call consistent. So the attribute city_district is actually never in the JSON response, and you will have its value just in the display_name.
Here are all locations for Baden-Württemberg, here the params for the Nominatim API search call, here is the proper country address format for Germany (street house_number, postalcode place).
1. In my opinion you should fill the listing form fields just with values like:
Listing Address Field: road house_number, city|town|village
Listing City/Location Field: city|town|villageand nothing more. Like that you will have the address as the German norm. So please do not fill the fields with suburbs or neighborhoods of little villages and do not use that part of the display_address field like ‘Verwaltungsgemeinschaft X’ or ‘Verwaltungsverband X’. These are 2 administrative levels (maybe as the city_district) just in some German states and they are not consistent, so X can be also a region name instead a city name, see the example 6 below. Do never use them for anything.
Here are some examples, to better understand the API response in this German state:
Example 1: village near big city Lahr/Schwarzwald, with its administration in Lahr/Schwarzwald (the data for this village is in OSM not updated, in this case use always the village)
searching for: ‘Luisenstraße 5, Kippenheimweiler′
OSM will suggest the address: ’5, Luisenstraße, Kippenheimweiler, Verwaltungsgemeinschaft Lahr/Schwarzwald…’
and the autofill for address: ’5, Luisenstraße, Kippenheimweiler, Verwaltungsgemeinschaft Lahr/Schwarzwald’
it should be: ‘Luisenstraße 5, Lahr/Schwarzwald’
can be: ‘Luisenstraße 5, Kippenweiler’and the autofill value for the City field: ‘Kippenweiler′
it should be: ‘Lahr/Schwrzwald′
can be: ‘Kippenweiler’{"display_name":"5, Luisenstraße, Kippenheimweiler, Verwaltungsgemeinschaft Lahr\/Schwarzwald, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77933, Deutschland", "class":"highway", "type":"residential", "importance":0.245, "address":{ "house_number": "5", "road":"Luisenstraße", "village":"Kippenheimweiler", "county":"Ortenaukreis", "state_district":"Regierungsbezirk Freiburg", "state":"Baden-Württemberg", "postcode":"77933", "country":"Deutschland", "country_code":"de" } }
Example 2: another village as in example 1
searching for: ‘Ruländerstraße 5, Durbach′
OSM will suggest the address: ‘5, Ruländerstraße, Durbach, St. Anton, Verwaltungsgemeinschaft Offenburg…’
and the autofill for address: ‘5, Ruländerstraße, Durbach, St. Anton, Verwaltungsgemeinschaft Offenburg’
it should be:’Ruländerstraße 5, Durbach’and the autofill value for the City field: ‘Durbach′
it should be: ‘Durbach′{"display_name": "5, Ruländerstraße, Durbach, St. Anton, Durbach, Verwaltungsgemeinschaft Offenburg, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77770, Deutschland", "class": "building", "type": "yes", "importance": 0.331, "address": { "house_number": "5", "road": "Ruländerstraße", "residential": "Durbach", "suburb": "St. Anton", "village": "Durbach", "county": "Ortenaukreis", "state_district": "Regierungsbezirk Freiburg", "state": "Baden-Württemberg", "postcode": "77770", "country": "Deutschland", "country_code": "de" } }
Example 3: little village
searching for: ‘Unditzstraße 6, Schutterzell′
OSM will suggest the address: ’6, Unditzstraße, Schutterzell, Ottenweier Hof, Neuried…’
and the autofill for address: ‘6, Unditzstraße, Schutterzell, Ottenweier Hof’
it should be: ‘Unditzstraße 6, Neuried’
but can be: ’6, Unditzstraße, Schutterzell, Ottenweier Hof, Neuried’and the autofill value for the City field: ‘Neuried′
it should be: ‘Neuried′
can be: ‘Schutterzell’"display_name": "6, Unditzstraße, Schutterzell, Ottenweier Hof, Neuried, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77743, Deutschland", "class": "building", "type": "yes", "importance": 0.331, "address": { "house_number": "6", "road": "Unditzstraße", "residential": "Schutterzell", "suburb": "Ottenweier Hof", "village": "Neuried", "county": "Ortenaukreis", "state_district": "Regierungsbezirk Freiburg", "state": "Baden-Württemberg", "postcode": "77743", "country": "Deutschland", "country_code": "de" }
Example 4: another normal village
searching for: ‘Belzackerweg 6, Kappelrodeck′
OSM will suggest the address: ‘6, Belzackerweg, Zuckerberg, Mattenmühle, Verwaltungsverband Kappelrodeck…’
and the autofill for address: ‘6, Belzackerweg, Zuckerberg, Mattenmühle, Verwaltungsverband Kappelrodeck’
it should be:’Belzackerweg 6, Kappelrodeck’and the autofill value for the City field: ‘Kappelrodeck′
it should be: ‘Kappelrodeck′{"display_name": "6, Belzackerweg, Zuckerberg, Mattenmühle, Kappelrodeck, Verwaltungsverband Kappelrodeck, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77876, Deutschland", "class": "building", "type": "yes", "importance": 0.221, "address": "house_number": "6", "road": "Belzackerweg", "neighbourhood": "Zuckerberg", "suburb": "Mattenmühle", "village": "Kappelrodeck", "county": "Ortenaukreis", "state_district": "Regierungsbezirk Freiburg", "state": "Baden-Württemberg", "postcode": "77876", "country": "Deutschland", "country_code": "de" } }
Example 5: another little villagesearching for: ‘Messingstraße 10, Legelshurst′
OSM will suggest the address: ’10, Messingstraße, Legelshurst, Willstätt, Ortenaukreis…’
and the autofill for address: ’10, Messingstraße, Legelshurst’
it should be:’Messingstraße 10, Willstätt’
can be: ‘Messingstraße 10, Legelshurst’and the autofill value for the City field: ‘Willstätt′
it should be: ‘Willstätt′{"display_name": "10, Messingstraße, Legelshurst, Willstätt, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77731, Deutschland", "class": "building", "type": "yes", "importance": 0.331, "address": { "house_number": "10", "road": "Messingstraße", "residential": "Legelshurst", "village": "Willstätt", "county": "Ortenaukreis", "state_district": "Regierungsbezirk Freiburg", "state": "Baden-Württemberg", "postcode": "77731", "country": "Deutschland", "country_code": "de" } }
Example 6: example of town and why you should never use the part ‘Verwaltungsgemeinschaft …’ or ‘Verwaltungsverband …’ of the display_name stringsearching for: ‘Eichbühlstraße 5, Bad-Griesbach′
OSM will suggest the address: ‘5, Eichbühlstraße, Spinnersberg, Bad Peterstal-Griesbach,Verwaltungsverband Oberes Renchtal…’
and the autofill for address: ‘5, Eichbühlstraße, Spinnersberg, Verwaltungsverband Oberes Renchtal’
it should be:’Eichbühlstraße 5, Bad Peterstal-Griesbach’and the autofill value for the City field: ‘Bad Peterstal-Griesbach′
it should be: ‘Bad Peterstal-Griesbach′{"display_name": "5, Eichbühlstraße, Spinnersberg, Bad Peterstal-Griesbach, Verwaltungsverband Oberes Renchtal, Ortenaukreis, Regierungsbezirk Freiburg, Baden-Württemberg, 77740, Deutschland", "class": "building", "type": "yes", "importance": 0.221, "address": { "house_number": "5", "road": "Eichbühlstraße", "suburb": "Spinnersberg", "town": "Bad Peterstal-Griesbach", "county": "Ortenaukreis", "state_district": "Regierungsbezirk Freiburg", "state": "Baden-Württemberg", "postcode": "77740", "country": "Deutschland", "country_code": "de" } }
2. I’ve tried to change your osm js code and add some more params in order to restrict and optimize the search and the country address format (feature request: could be very nice to have this options in the back-end for local directories)
accept-language=<browser language string> <a href="https://wiki.openstreetmap.org/wiki/Bounding_Box">countrycodes</a>=<countrycode>[,<countrycode>][,<countrycode>]... viewbox=<x1>,<y1>,<x2>,<y2> bounded=[0|1]
As my project is restricted to this German state:
accept-language='de-DE' countrycodes='de' viewbox=7.5,47.6,10.5,49.8 bounded=1
But this did not work and I could not see the changes applied to the OSM search. Do I have to put it in other functions too as in geocodePositionOSM ?
February 15, 2018 at 2:58 pm in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #417777Hi Stiofan, this is working now much better. The most of the cases are now OK.
As for
example 1: village near big city Lahr/Schwarzwald, which is actually a suburb of the city
searching for: ‘Luisenstraße 5, Kippenheimweiler′
OSM will suggest the address: ’5, Luisenstraße, Kippenheimweiler, Verwaltungsgemeinschaft Lahr/Schwarzwald’
and the autofill value for the City field: ‘Regierungsbezirk Freiburg′
it should be: ‘Lahr/Schwarzwald′The suggested address does contain that part but there is no way for me to be able to reliably know what part of that string is a city/town.
1. I cannot see in the API return for #1 the field with the value ‘Verwaltungsgemeinschaft Lahr/Schwarzwald’. It is the city_district ?
2. Do you have a link to the OSM API docs for address autocomplete? Or do you have a list with all the name of the returned fields (state, state_district, etc.) ?
February 15, 2018 at 1:09 pm in reply to: Understanding CPT search and CPT synchronization in the different GD sections #417764Thank you,
OK, in this case I will add an extra Popular Post View widget for Events. But, :), is the usability for the GD home page and Location page the optimal one?
1. When I change the CPT Places to Events in the header search, the Search widget does trigger the featured Popular Categories below the search and does update it to show the Events categories. Why not to have also the option to automatically update the map and the other widgets too? Is this not confusing? Or at least the map, since I can add the two other widgets for Events too. What about, when I have a lot of CPTs?
2. Did anyone try to make the content of the widgets on the GD home page aware of the selected CPT in the header search?
February 15, 2018 at 12:40 pm in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #417760This reply has been marked as private.February 15, 2018 at 12:07 pm in reply to: Understanding CPT search and CPT synchronization in the different GD sections #417755This reply has been marked as private.February 15, 2018 at 12:04 pm in reply to: Understanding CPT search and CPT synchronization in the different GD sections #417752Hi Guust and thank you for your attention.
I’m talking just about the homepage. The widgets are the right ones in the homepage sections.
1. call the homepage
2. change in the header search just the CPT from Places to Events, without searching for a word or location
3. this will automatically update the featured popular categories section below the header search on the homepage but not the content of the following widgets: map, popular places, latest places – all on the homepage.
4. even if I manually change the CPT on the map widget to Events, the content of popular places and latest places on the homepage will not automatically update. (both widgets have the option “Use current viewing post type:” ticked.February 15, 2018 at 7:37 am in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #417690This reply has been marked as private.February 15, 2018 at 7:35 am in reply to: Use of avatar on the listing page in Supreme Directory and UsersWP integration #417689Thank you Patrik, I see that you have now a user account. This will be helpful with further questions.
MariusFebruary 14, 2018 at 3:40 pm in reply to: Use of avatar on the listing page in Supreme Directory and UsersWP integration #417587This reply has been marked as private.February 14, 2018 at 3:30 pm in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #417582Hello Alex,
in my opinion, when adding a new listing the selected location from the OSM API for the field City is wrong. When the address is a village or even a village nearby and part of a bigger city, the suggested city is in a lot of cases the governmental district of the state, which is wrong. And the user cannot change manually the city, since OSM will replace it with the false one.
My Project is a local one, just for the state Baden-Württemberg, Germany. And keep in mind the format of the OSM answer: ‘street nr, street, village, municipality(rural city), rural district, governmental district, state, postcode country’
Example 1: village near big city Lahr
searching for: ‘Luisenstraße 5, Kippenheimweiler′
OSM will suggest the address: ’5, Luisenstraße, Kippenheimweiler, Verwaltungsgemeinschaft Lahr/Schwarzwald’
and the autofill value for the City field: ‘Regierungsbezirk Freiburg′
it should be: ‘Lahr′Example 2: normal village
searching for: ‘Unditzstraße 6, Schutterzell′
OSM will suggest the address: ’6, Unditzstraße, Schutterzell, Ottenweier Hof, Neuried’
and the autofill value for the City field: ‘Regierungsbezirk Freiburg′
it should be: ‘Neuried′So the suggestion is wrong, ‘Regierungsbezirk Freiburg′ is not a city/location it is a governmental district of the state with hundreds of cities/locations.
a. Can you confirm the bug?
b. Where and how can I change the call to the OSM-API? I need the files and some links to the docs for the calling params. I’ll try to work together with the German OSM community too.February 14, 2018 at 1:59 pm in reply to: Use of avatar on the listing page in Supreme Directory and UsersWP integration #417566Hello Alex and thank you for your time.
It took some time or saving steps of listings and profiles or it was a cache problem, but now is working, UsersWP does replace the gravatar placeholder on the listing detail page through the profile image after the last update.February 13, 2018 at 1:53 pm in reply to: Understanding OpenStreetMap, auto-fill API and saving cities (locationss) #417391Hello Support Team,
do you have an idea on how can I find a solution for the second and third question. Since I can not change afterwards the location and the location/city selection from the OSM API is wrong for smaller and urban cities, I do have a problem and I do not know how to fix it.
Greetings, Marius
February 3, 2018 at 1:56 pm in reply to: Changing from Google Maps JS API to OpenStreetMap API afterwards #415769Thank you, Alex, nice example. I’ll have to make some experience and then a tutorial about this for the users or even for the website visitors, that they can add information to the OSM or correct data, why not.
-
AuthorPosts