• Resolved markburton52

    (@markburton52)


    Hi,
    I’m struggling to get the map to load on the front end. I can make it load on the back-end by clicking the search button but I can’t figure out how to make that also appear in the front end. I think I need to do that since, as I understand it, the OSM won’t load automatically since the open cage server isn’t called automatically on loading the page?
    Thanks
    Mark

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    Hi @markburton52,

    The “Search Address” button should only be used when creating a new physical EM Location in either the “Edit Event Page” or “Add New Location Page” in your WordPress Admin.
    Clicking that button will connect to OpenCage API server, retrieving the coordinates using the location address field values as the search query. Those coordinates will be stored in your WordPress database when you click “Publish” or “Update”.

    Looking at your link, it seems to be a standard single event (bookings) page. You seem to use a link to Google Maps… Please make sure that your markup contains the placeholder #_LOCATIONMAP in: Dashboard -> Events -> Settings -> Formatting -> Events -> Single Event Page -> Single event page format.

    Also, please check your theme’s frontend.js, because the browser console window gives an error that “wp” is undefined. Any errors in jQuery will stop processing the rest of the script.

    Thread Starter markburton52

    (@markburton52)

    Thanks, that’s been helpful. It did seem like there was a problem with the frontend.js which has now been fixed. A couple more questions,
    1) I’ve uploaded locations using the WP All Import plugin. There will eventually be some 60 or 70 of them. Is there any way to do a bulk search for coordinates?
    2) There is a link to googlemaps so that the user can load a full map with the location on it – is that likely to conflict with the OSM coordinates and their storage in the database?
    Thanks again for your help.

    Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    WP All Import is absolutely a wonderful plugin, but I am not sure if it is the best fit for importing into Events Manager, because Events Manager stores the events and locations not only as posts, but also as objects in their custom database tables (wp_em_events & wp_em_locations).
    So, if you import the locations as posts, you will need to open each imported entry in the “Edit Location Page” and click “Update” to allow Events Manager to assign a Location ID (different from the Post ID) and process the entry correctly.

    Since you are then already in the Edit Location Page, please check if the location address fields have been imported correctly. If so, click the “Search Address” button (before updating the post) to fetch the coordinates. The full OpenCage API search result will be visible in your browser console window.

    At this point the marker is still draggable, so you can move it to a more precise position on the map, if needed. Then click “Update” to store everything.

    In the EM – OpenStreetMap options page there is an option to “Show Fullscreen”. If that toggle has been set to “Yes”, the front-end map will show a button to allow you visitor to open the map in fullscreen. So there is no need to include a Google Maps Link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search button doesn’t show in front end’ is closed to new replies.