Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with creating a filtered map #781

Open
carelostok opened this issue Mar 1, 2017 · 2 comments
Open

Problem with creating a filtered map #781

carelostok opened this issue Mar 1, 2017 · 2 comments

Comments

@carelostok
Copy link

carelostok commented Mar 1, 2017

Hi there,
Geo Mashup is such a great plugin, thanks so much for all the work, you put in its development! I’m using it and it works for the better part. Everything works fine on the global map (https://www.urbaneoasen.de/) and also on the single-post-maps (e.g. https://www.urbaneoasen.de/project/planckgarten/).

But here’s my problem: I wanted to create a map where only posts related to a certain city are shown. The plugin offers the shortcode „locality=…“. So I put [geo_mashup_map post_type="project,event" map_content="global" locality_name="Dortmund"] on my page (https://www.urbaneoasen.de/staedte/dortmund). But the map doesn’t show all my posts, that are related to that locality. Why is that? Does anyone have a clue?

Alternative idea:
I’m also working with taxonomies and terms. Every city is also a term oft he taxonomy „staedte“ (city in german). I could also change the shortcode into something like [geo_mashup_map post_type="project,event" map_content="global" taxonomy=“staedte“ term="Dortmund"]. But that shortcode doesn’t work. Am I missing something here?

I‘m using WordPress 4.7.2, Divi theme and different custum-post-types

I’d be glad for any hints.
Carlos

@anorupl
Copy link
Contributor

anorupl commented Mar 1, 2017

When it comes to second option with taxonomies and terms (tax_query). Currently only usable with template tags (not shortcodes).

(https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Tag-Reference#query-variables)

tax_query - a taxonomy query array in the format used by WP_Query. Currently only usable with template tags (not shortcodes).

@cyberhobo
Copy link
Owner

Thanks Carlos, let's see if improved documentation could solve your problem. You may have noticed this sentence in the map tag reference:

Some fields, like locality_name and postal_code, will only work if reverse geocoding is enabled and the target objects have been successfully geocoded.

So the first question is, do you have Settings / Geo Mashup / Overall / Enable Reverse Geocoding checked? If so, was it checked when the locations you're mapping were saved?

Geo Mashup uses the GeoNames API for reverse geocoding. To make this reliable, it's best to register a GeoNames account and enter your username in Settings / Geo Mashup / Overall / Obscure Settings / GeoNames ID. (That isn't really an obscure setting, I made issue #782 to remove it).

Finally, you may want to try Settings / Geo Mashup / Overall / Bulk Reverse Geocode to get locality information for locations that may not already have it.

Let me know if this is helpful, and I'll add it to the current documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants