Maps in tabs

  • esedic
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago - 5 years 4 months ago #12010 by esedic
Replied by esedic on topic Maps in tabs
Hi!

I have prepared couple of examples, how I use ZH OSM with content plugin. For content I use K2 component.
  1. shortcode in K2 item introtext: mklj.silkstack.com/index.php?option=com_...id=17902&Itemid=2434
  2. shortcode in K2 item extra field (type: editor): mklj.silkstack.com/index.php?option=com_...id=17903&Itemid=2434
  3. shortcode in K2 category description: mklj.silkstack.com/vse-kategorije/itemlist/category/299
  4. shortcode in Joomla custom module inserted in K2 item with loadposition tag: mklj.silkstack.com/index.php?option=com_...id=17904&Itemid=2434
  5. multiple maps on one page: mklj.silkstack.com/index.php?option=com_...id=17905&Itemid=2434

Since last update every example works except example 2: shortcode in K2 item extra field. See browser console log for error. Problem is "-" (hyphen) character in string "com_k2_item-extrafields".

For testing purposes I used RegularLabs ReReplacer to replace hyphen "-" with underscore "_" in HTML output, so "com_k2_item-extrafields" becomes "com_k2_item_extrafields" and the error was gone and the map displayed properly.

I hope this is any help.
Last edit: 5 years 4 months ago by esedic.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #12017 by Dima
Replied by Dima on topic Maps in tabs
Hi.
Thanks, I can see all works fine (not my error messages) that only map#2 doesn't work due to hyphen.
I fixed it, just check in extension manager for new version of plugin.

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 5 years 4 months ago by Dima.

Please Log in or Create an account to join the conversation.

  • esedic
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 2 months ago #12069 by esedic
Replied by esedic on topic Maps in tabs
Hi!

Again I have a javascript error when displaying map in K2 item with ZHOM content plugin:
ZhJQ_com_k2_item_14749_0_4_map is not defined

See www.mklj.si/ljubljanske-zgodbe/kulturna-...iscina-na-zemljevidu (this is production site with code compression & minification).

Map on this page was working, I think after last update this error appeared (not sure though).

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #12072 by Dima
Replied by Dima on topic Maps in tabs
Hi.
Your core stripes it.
My code like
var ZhJQ = jQuery.noConflict();
var map, popup;
var zhomObjMgr;
var latlng;
var routedestination, routedirection;
var mapzoom;
var userContactAttrs = 'name,position,address,phone,mobile,fax,email';
var icoIcon='https://test.zhuk.cc/administrator/components/com_zhosmmap/assets/icons/';
var icoUtils='https://test.zhuk.cc/administrator/components/com_zhosmmap/assets/utils/';
var icoDir='administrator/components/com_zhosmmap/assets/icons/';

As I can see your code like
var ZhJQ_com_k2_item_14749_0_4_map = jQuery.noConflict();
was removed by your script optimizer

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.097 seconds

Donate


Go to top