Setting Map to custom Location, & Oversized Container?
This topic contains 6 replies, has 3 voices, and was last updated by Paolo 9 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: customizing, location, map
-
AuthorPosts
-
July 20, 2015 at 3:57 am #46186
From what I understand we can adjust zoom but not customize a map to tell it where to zoom. Is there any way around that to set a location?
For example, Places A, B, C, and D are listed. A, B, C are all near each other, but location D is off to the left of the others. In fact, D is so far that it makes the map show the space between these locations. This obviously isn’t helpful when looking at the map.
Any idea how this can be fixed on my end?
Also, looking at the screenshots I provided below, any reason why the listings box on the right breaks out of the map in the top-right? I think I found it was an issue with a max or minimum height in one of the CSS containers:
id=”gd_home_map_cat” contains the proper max-height but doesn’t account for the 10px padding around it. Thus, a max-hieght=500px needs to be 20px less.
Cheers.
July 20, 2015 at 6:11 am #46190We would need to see the CSS issue on your actual site, so can you please provide a URL (you can do that in a private reply if you like – provide admin details too).
You should not set the map height using CSS, but in the GD map widgets.You can set your map zoom to a zoom level you like, and disable auto-zoom. That might be suitable for you, depending on your listings.
July 20, 2015 at 3:50 pm #46253Unfortunately, my site is only local at the time. The CSS question was more of bringing it to the GeoDir Dev’s attention because: It’s been a consistent issue since a clean WP install through various themes.
This may well be on my end. I will let ya’ll know if it still occurs with a fresh install before I move my local developing site to the web. However, if you wish to take a look here’s the file name, line, and class:
map.scss:431 .map_category
The padding mentioned here looks intentional (and better with it than without) so I suspect it’s something to do with taking account of how the padding is not factored into #gd_home_map_cat‘s max-height.I have GeoDirectory’s map settings for max-hight at 500px so the HTML for the category listings box (#gd_home_map_cat) has:
<div id="gd_home_map_cat" class="gd_home_map_map_category map_category" style="max-height:500px;">
But should be 480px because the padding takes up 20px. Again. Don’t stress this since it may be my end since you haven’t seen this.
My apologies for not being specific with setting the map’s default location. I already set the zoom to what I’d like it to be (auto-zoom is off), it just doesn’t look at the portion of the map I need it to be. These two screen shots show the default focus, then that default focus zoomed out. I want to force the map to be zoomed in on that massive cluster of locations to the right. Is there a way to force the map to look there? I think GeoDirectory is finding the center of all locations but I want to set that “center” focus elsewhere, where most of the places are located.
One last question: Is there a way to create an old-school-like listings page?
i.e. The following shown instead of the standard image and name.Best Listing Ever Store
123 Fake St.
City, State
1-800-555-5555
BestWebsite.comWhy I want that: I’d like to set up one page that offers the basic listing details in a block form broken up into their categories in one continuous stream. This way the contact info is at the ready without having to click on the listing to load another page. Maybe I’m missing this layout because it’s in a plugin?
Thanks for the info!
July 20, 2015 at 9:57 pm #46298The map can only center on the listings displayed.
To display the address details on the listings page:
GD > Place settings > custom fields > address field > show on listing page > yes
https://wpgeodirectory.com/docs/core-place-settings/#commonYou can then hide all other bits and pieces if you like, or edit the template as per
https://wpgeodirectory.com/docs/customizing-geodirectory-templates/July 20, 2015 at 9:59 pm #46299Ignore my last question about showing the place details on Listing widgets/shortcodes (sorry I can’t edit it). I needed to set “Show on Listing Page?” to “Yes” for each field in GD’s Place Settings.
Derp. Looks like I just missed ya. Sorry about that. Thanks for at least clarifying the map question. Maybe there’s a dirty way to code it… I’ll have to keep snooping around.July 20, 2015 at 10:29 pm #46308I finally found another user looking to change the center focus – unfortunately there were no follow-ups.
I did find out what API code will focus the Map on lat-Long but I have no idea what file or where I would edit it. Java is a little further than my current knowledge.
July 21, 2015 at 2:43 pm #46373Hi,
There is no way to do this without modifying core plugin files, which is considered a customization for which we don’t provide support. In addition any change would be wiped after every update.
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket