google maps view setting

Hi,

I have implemented google maps on the directory listing page. What i would like to do is to get the map to zoom and show the address for the particular listing. I have connected the same to the respective custom fields that has the latitude, longitude and address field.

Also i would like to change the size of the map displayed which is not working when getting it done.

Thanks and Regards,
Alagiri

  • dialmint

    Hi @Ashok,

    How are you? I am fine thank you for asking.

    Yes I did use the option you provided and it did work. But i think the issue was that every time i changed the setting (i.e. different combination of the various options it kept creating new codes). Where before i wrote to you I the code was "[map id="5"] and now it is using [map id="12"].

    Can i make the map to show the current location of the listing on the listing page and on the home page show the users current location.

    And can this be used in combination with GeoMyWP as i am using it to show proximity based search results. But if i can get a proximity based search results with "Google Maps Plugin" I will use this itself rather than another plugin.

    I also tried using the widget on the side bar but it does not show up. Only the shortcode works. Checkout this link

    Thanks and Regards,
    Alagiri

  • Ash

    Hello @alagiri_rajesh

    I hope you are well today.

    You can edit individual map. To zoom, just use the zoom attribute like:

    [map id="12" zoom="16"]

    To use different width and height, edit a map, click on map options and give the dimension, check screenshot.

    About listing page map, you can use custom field for location, you just need to map the field in Settings > Google Map > Custom field. (screenshot attached)

    About GEOMyWp integration, you need to customize the plugin. It can't be directly integrated out of the box. Also, if you need to customise this then you can post a job in our job board where you can hire a developer to assist further: https://premium.wpmudev.org/wpmu-jobs/ Please note that, no WPMU official staffs are allowed to work in the job board.

    Cheers
    Ash

  • dialmint

    Hi @Ashok,

    I hope you are doing well too. Thank you for your response. The options provided by you i was able to get the size of the map required but not zoomed and marked. As of now it shows New York on all pages. Check out this link

    The following is what i want.

    1. What i want is a map on the home page showing the users current location.
    2. Show a map on the listing page with the listing's location zoomed and marked.
    3. Show a map on the search results page which will show the results shown currently all marked. I think this is not possible with Google Maps Plugin so i would like to user GeoMyWP for this.
    4. Provide proximity based search results, which is again possible with GeoMyWP only.
    5. Use the GeoMyWP's search form to be used for search

    I would prefer to use 1 plugin as i think it should be better. But as the maps are not showing up from GeoMyWP using Google Maps (where the maps are not showing with the widget for Google maps as well). And the search functionality of GeoMyWP is required. So this is why i want to know if i can use both GeoMyWP and Google Maps. I do not want to integrate them both.

    Thanks and Regards,
    Alagiri

  • Ash

    Hello @alagiri_rajesh

    The correct code should be:

    [map id="12" zoom="16"]

    It's all the zoom attribute that you need. Put any value in it.

    1. To show current user's location you need to enable Where am I add on from Settings > Google Maps > Add on.

    2. To show it automatically, you need to set the zoom from Google Map settings, otherwise you have to manually include the zoom parameters.

    3. About GEO My WP plugin, I have tried though but could not figure it out. If you please post a question in there, they will be able to help you. (I already saw that you have posted already)

    Cheers
    Ash

  • dialmint

    Hi @Ashok,

    Thank you for your response. Also I was able to change the location with the "Where am I" addon. Below are the issues.

    1. When i login it shows me my current location on a map which is correct what was required but is not zooming as required.
    2. The same map is showing up on all the posts.
    3. And on the listing page it shows 2 maps.
    4. Also can you please let me know what is the use of GeoTagging the listing if it will not be used by global site search to show proximity based results.
    5. Also how do i remove the "drop-down" on the top right corner of the map "Map", "Satellite" and "Terrain".
    6. It is not possible to manually edit the map for each and every post as i will be importing over 3 million records. Which is practically impossible to set the map for each and every listing. I have associated the "Custom Field name" created by custompress in the settings for google maps. So ideally it should detect the location of the post on its own, am i right?

    You can check out on the current status on my link

    Thanks and Regards,
    Alagiri

  • Michael Bissett

    Hey @alagiri_rajesh, hope you're doing well today! :slight_smile:

    #6: It should, yes. :slight_smile:

    #5: That would require you to hire a developer, though you can learn more about what would be required here:

    http://stackoverflow.com/a/4322176

    #4: You can show the Geotagged posts on a page using this shortcode, if you wish:

    [agm_gwp_geocoded_posts]

    #3: Once again, this would be the sidebar widget, correct? It was showing up as two maps previously, checking the box for "Show as one map" in the widget settings resolved that. :slight_smile:

    #2: Inside of:

    Settings -> Google Maps -> Where Am I?

    You had it set to "I want to automatically show visitor locations on all my maps".

    After switching that option to "I want to specify which maps will show visitor location using a shortcode attribute", that resolved this issue (though you'll need to specify a map to show the visitor's location using the shortcode parameter mentioned on that settings page).

    #1: Borrowing from point #2, you'll need to use a shortcode to display the map on the home page for this, since I adjusted that setting I mentioned in point #2 for you.

    My apologies if I've missed anything here, there's a lot of questions here in this thread, and that means there's a lot of ground to cover. Nonetheless, hope this helps! :slight_smile:

    Kind Regards,
    Michael

  • dialmint

    Hi @Michael Bissett,

    How are you? Merry Christmas and Happy New Year in advance.

    #1. Please let me know what code am i support to use to show the users current location on the home page and on the internal pages i would like to show the respective listing's location on the same map. (Right side bar)

    #2. I tried using the shortcode [map id="12" zoom="16" visitor_location="yes"] by selecting "Custom Query" and have not checked "This is a network query (requires Post Indexer plugin) - only "tag=..." supported". Now it does not show up anything. But I user the same code on a text box widget it shows up a map but with the wrong location. Where I am in "New Delhi" and it shows my "Jaipur" which is not correct. Also when i click on "Directions" it shows a different location and no my current location.

    #3. Sure I had got this to work and was also displaying a detailed map as well like as i wanted. But this disappeared when i tried #2

    #4. This does show me a map but does not show the location correctly. It shows me New York by default with the [agm_gwp_geocoded_posts]. You mean to say that i can show the user with posts relevant to their location? If so can this be done even for search as is or does it require customization?

    #5. I will look into this in the future. Thank you very for your suggestion and reference.

    #6. You said that it should take the location but i dont see a map displayed. I would like to show the map on the "right side bar".

    You can check this out on the link

    Thanks and Regards,
    Alagiri

  • Michael Bissett

    Hey @alagiri_rajesh,

    #1. Please let me know what code am i support to use to show the users current location on the home page and on the internal pages i would like to show the respective listing's location on the same map. (Right side bar)

    You would need to have some custom development to show all of that in the right sidebar, the idea I had in mind was to show the location of the user on the content area of the home page by using a map shortcode, it wouldn't be placed in the sidebar.

    Would you be okay with having the user's location show up there? You can see what this would look like if you visit this test page I created:

    http://wordpress.wpms.bitnamiapp.com/wpmu-dev-test-page/

    As for showing the location of a listing on a map, you'll notice that on the test site you created, the map is showing at the bottom of the page. Right out of the box, the location information entered in your custom fields can show up at the top of the page, or at the bottom.

    #4. This does show me a map but does not show the location correctly. It shows me New York by default with the
    [agm_gwp_geocoded_posts]
    . You mean to say that i can show the user with posts relevant to their location?

    Nope, that shortcode would show posts that have been tagged with a location (this would be done in the "Location" box on the post editor screen). As for this:

    If so can this be done even for search as is or does it require customization?

    That would require some custom development presently.

    Let me know if I can be of further assistance here please! :slight_smile:

    Kind Regards,
    Michael

  • Predrag Dubajic

    Hey Alagiri,

    Hope you're doing well today :slight_smile:

    Unfortunately text widget does not support use of shortcodes by default so you will need make some changes to make this possible, you can read more about it in this article.

    Basically you will need to add this part of code to your functions.php file:
    add_filter('widget_text', 'do_shortcode');

    Hope this helps.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.