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

Markers in Global map is not work with active plugin Polylang #661

Open
GoogleCodeExporter opened this issue Apr 4, 2015 · 15 comments
Open

Comments

@GoogleCodeExporter
Copy link

Geo Mashup 1.6.2
Polylang 1.1.2

If Polylang active than global map is show just map, without markers. Problem 
with languages.

Original issue reported on code.google.com by istomin....@gmail.com on 16 Jul 2013 at 7:11

@GoogleCodeExporter
Copy link
Author

Thanks for noting the incompatibility. Let us know if you find a workaround.

Original comment by dylankk...@gmail.com on 16 Jul 2013 at 7:49

  • Changed state: Accepted
  • Added labels: Type-Incompatibility

@GoogleCodeExporter
Copy link
Author

I found that problem with geo mushup plugin. Because if I set option "Include 
Taxonomies - Categories" (Makes legends, colors, and other features available) 
and after set colors for categories then I see problems.
It is connected somehow with the languages​​. I dont know how...

Original comment by istomin....@gmail.com on 16 Jul 2013 at 8:18

@GoogleCodeExporter
Copy link
Author

There is a similar incompatibility with WPML in issue 623 that has a workaround 
- perhaps something similar would work with polylang.

Original comment by dylankk...@gmail.com on 16 Jul 2013 at 8:34

@GoogleCodeExporter
Copy link
Author

May be... I asked in your issue about your workaround. Please get an answer for 
me

Original comment by istomin....@gmail.com on 16 Jul 2013 at 8:40

@GoogleCodeExporter
Copy link
Author

Thank you. But Polylang dont have this option.
I dont have workaround now...

Original comment by istomin....@gmail.com on 16 Jul 2013 at 8:56

@GoogleCodeExporter
Copy link
Author

Hello,
I am not sure why this happen...
However a workaround (that works for me), is to install "Query Monitor".
After activating it I do not have any problems (but the Include taxonomies 
options still does not work)

Original comment by ximil...@gmail.com on 11 Mar 2015 at 8:22

@flknx
Copy link

flknx commented Sep 11, 2015

Hi,

Just stumbled to this problem, I think (atleast the global map isn't loading :). Unfortunately, I can't really JS, but if anyone's interested in this problem, here's the error that appears on page with global map.

TypeError: Cannot read property 'color' of undefined
5 wp-content/plugins/geo-mashup/js/taxonomy.js?ver=1.8.4:413:50
4 wp-content/plugins/geo-mashup/js/taxonomy.js?ver=1.8.4:413:50 Object.jQuery.extend.term_manager.term_manager.extendTerm()
3 wp-content/plugins/geo-mashup/js/geo-mashup.js?ver=1.8.4:708:31 Object.GeoMashup.addObjects()
2 wp-content/plugins/geo-mashup/js/geo-mashup-mxn.js?ver=1.8.4:743:8 Object.GeoMashup.createMap()
1 ?geo_mashup_content=render-map&map_data_key=fb481e522fe732bff6e2e0589dfa4275&lang=fi&object_id=871&map_content=global&name=gm-map-2:39:11

However, in my use case, I was able to achieve the same end result with manually adding categories, for example [geo_mashup_map map_cat="9,11"], instead of using [geo_mashup_map map_content="global"].

@SebastienGicquel
Copy link

Hello,

I like geomashup. A great plugin which can do everything !

I have the same issue. Geomashup works very well but i can’t display a map if i activate translation with polylang.

Is it solved or do i need to use an other map plugin ?

I’ve tested a lot of thing and could not find a solution.

In console, i have this error :

TypeError: undefined is not an object (evaluating 'term_properties[taxonomy].terms[term_id].color')

Here is how i display map in template:

<?php echo GeoMashup::map('map_content=global&map_cat=planete') ?>

The map is ok in a language (FR) but if i translate a post it doesn’t work anymore.

Best regards,

Sébastien

@cyberhobo
Copy link
Owner

@vinylroads , if you can give me a URL where I can see the issue that would help me at least determine a next step. Alternately, posting the arguments to the GeoMashup.createMap( ... ) call in the map frame here would be useful.

@aerdemsenturk
Copy link

Hello,
@cyberhobo @vinylroads
Have you found any solution for Polylang issue? There's a problem with global map. Contextual map is working well.

@SebastienGicquel
Copy link

Sorry, on this project that required polylang, i gave up and built my own custom map with custom type + ACF.

@eliazu
Copy link

eliazu commented Jul 7, 2018

i've edited the wp-content/plugins/geo-mashup/js/taxonomy.js file.

changed at line 413
if ( term_properties[taxonomy].terms[term_id].color ) { color_name = term_properties[taxonomy].terms[term_id].color; } else { color_name = GeoMashup.color_names[ loaded_taxonomy.term_count % GeoMashup.color_names.length ]; }

to

color_name = GeoMashup.color_names[ loaded_taxonomy.term_count % GeoMashup.color_names.length ];

and removed the if statement at line 468

if ( term_properties[taxonomy].terms[term_id].line_zoom ) { max_line_zoom = term_properties[taxonomy].terms[term_id].line_zoom; }

of course i did this in the min.js file ...

after this changes the map works with polylang!

@aerdemsenturk
Copy link

aerdemsenturk commented Jul 25, 2018

Hello @eliazu;
I tried it, It seems working but this time global map shows not only active language, all of language items. Unfortunetally it means it's not a true solution.

Hello @cyberhobo
Polylang is one of the popular and free multilang plugin. It would be great to implement with Geo-Mashup. Actually it's working with Contextual Map. As I observed just "Global Map" and "Nearby List" have a problem with Polylang.

@eliazu
Copy link

eliazu commented Jul 27, 2018

@Birtakimseyler it works for me. for all languages.
the English page, with code that query X last posts, queries only English places.
the french page, with code that query X last posts, queries only french places.

maybe you put the code not in a page with language defined, or you queried wrong posts languages or undefined languages.

@aerdemsenturk
Copy link

@eliazu Yes you're right. It could be solved in the the queries. I did not used like that. But still there's a problem with "Nearby list". Did you already found another solution about that?

Thank you!

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

No branches or pull requests

6 participants