Google Maps vs. Widget vs. TextShortCode Confusion

I am having some confusion between the implementation of Google Maps as a plugin, widget or through a text box and using the shortcode to add it. I installed the Google Maps Plugin, and was creating a section on UpFront to place the map and on the left navigator there is a Maps icon which I used to add a map. I quickly found out that this is not the plugin and something else. I also created a post and added the short code there and then added it through a text box on the section in upfront.

So first question, do I have to create a post to get the short code?
The other thing is on the Google Maps plugin there is custom fields. Where will those fields appear? I labeled them and they do not appear in the post or page when adding a map.

Ultimate goal is to place all the map locations on the main page in the Google Map section of upfront. I saw some information about tags but where do you place those? Do I assume the those short code goes in the post as well as the map shortcode?

This is very confusing.

Thanks,

Robert

  • Robert

    Hello Alex,

    I'm using the upfront system so I create a text widget and using this short code [map query=”tag=my_tag” network=”true” overlay=”true” show_images=”false” show_posts=”true” height=”100px” width=”100%”]. Problem now is that post information shows up below the map. Even if i add a map to a page, same thing. Also, I added a marker for Toronto and for some reason images of Toronto came up below the post information. very odd, but it is obviously a parameter that needs to be set. Hopefully you can help!

    Thanks,

    Robert

  • Adam Czajczyk

    Hello Robert,

    I hope you're well today and thank you for your question!

    The "Google Maps" icon in Upfront's panel refers to an in-built map that you can put e.g. in site footer (like many one-pager sites does). In order to place your Google Maps (coming from plugin) on the site you may use either a widget or a shortcode.

    1. using a widget

    - drag and drop "Widget" element from the Upfront panel to your layout
    - select "Google Maps widget" from the drop-down list in widget element settings
    - adjust parameters to your needs

    2. using shortcode

    - place the "Text" element on your page
    - paste your map shortcode there.

    This would mean that you're adding your shortcode the right way. You do not need to create a separate post/page for each map. You can create as many maps from a single post as you need but you do not need to insert them into the post. This gives you a handful of map shortcodes that you can then add via Upfront ext element.

    The other thing is on the Google Maps plugin there is custom fields. Where will those fields appear? I labeled them and they do not appear in the post or page when adding a map.

    On your dashboard's "Settings -> Google Maps -> Custom fields" page you can define names for those custom fields. The fields would contain latitude, longitude and/or address where the marker should be put on the map.

    For example, you could name these fields (accordingly): "Lat", "Long", "Address". Then please go to your dashboard's post/page editor, expand the "Screen options" tab and make sure that the "Custom Fields" option is checked. From now on the regular "Custom fileds" form should show up under post/page editor and you could then provide latitude/longitude/address data there. Depending on settings on "Settings -> Google Maps -> Custom Fields" page the map may be then automatically created, assigned to the post and inserted to it.

    I'm using the upfront system so I create a text widget and using this short code [map query=”tag=my_tag” network=”true” overlay=”true” show_images=”false” show_posts=”true” height=”100px” width=”100%”]. Problem now is that post information shows up below the map. Even if i add a map to a page, same thing. Also, I added a marker for Toronto and for some reason images of Toronto came up below the post information. very odd, but it is obviously a parameter that needs to be set.

    Generally, you're doing it right way. However, I'd like to check that on your setup so could I have a closer look? To allow me this, would you please grant me a support access to your site using our WPMU DEV Dashboard plugin?

    Here's a guide on granting support access:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Adam

  • Robert

    Hello Adam,

    I have granted access to the site. I've also checked custom fields, but still don't see them. So when you get to the site, I'm in the process of learning upfront and what it can do. I also removed most of the parameters so you can see what appears on the frontpage. You'll see the post and images. i know in the shortcode you can remove it but the marker list still shows up. Not sure if something is broken, but when i hover over the pin then the post information should appear.

    Thanks again for your help!

    Robert

  • Adam Czajczyk

    Hello Robert,

    Thanks for granting access and providing me with an additional explanation. I've logged in into your site and took a look at both Google Maps settings and the map on your homepage. I must admit that unless I understood something wrong, this seems to be working fine - as it should. I just tested it additionally on my own setup and can confirm that nothing seems to be wrong there.

    The map however may need a bit of additional CSS to suit your site's layout well but that's another issue. I can help you with that if necessary.

    As for custom fields. I just realized that I skipped an important information in my previous post. I can see that the "Custom Fileds" add-on is enabled, fields are given names and "Custom Fields" view is enabled for posts editor.

    To make use of it, please go to you dashboard's "Posts" list and edit selected post. In a "Custom Fields" section click on "Enter new" option and put the name of one of the fields set for Gogole Maps and then put its value to the "Value" box. The same should be done for other two Google Maps custom fields.

    This however needs to be done just once, next time you should be able to simply select these fields from the list. That's not a Google Maps error but rather a default WP feature - the fields that weren't initialized yet (were never used before) are not visible on that list.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.