Topic-icon Custom Cluster Marker Image in Geommunity

  • andkit01
  • andkit01's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
16 Jun 2018 15:56 #41755 by andkit01
Hi,

I'm trying to adjust the blue circular cluster marker with a custom png image. I looked into the file, it seems that the cluster marker image path is set on line 1566 in /modules/mod_geommunity3/js/markerclusterer.js file (see attached screenshot):

MarkerClusterer.IMAGE_PATH = " raw.githubusercontent.com/googlemaps/js-...er/gh-pages/images/m ";

I would like to change the image path to:
[joomla_root]/components/com_geommunity3/asset/img/cluster/cluster'

I tried the following but it doesn't work:
MarkerClusterer.IMAGE_PATH = JPATH_SITE.'/../../../components/com_geommunity3/asset/img/cluster/cluster';

Can you please help. Thanks!
Attachments:

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

More
16 Jun 2018 18:19 #41756 by nordmograph
Replied by nordmograph on topic Custom Cluster Marker Image in Geommunity
Hi,

JPATH_SITE doesn't exist in the js file. You should only use relative path.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

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

  • andkit01
  • andkit01's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
16 Jun 2018 19:26 #41757 by andkit01
Replied by andkit01 on topic Custom Cluster Marker Image in Geommunity
Hi,
Thanks. Could you clarify what I should put as the path?

I also tried below and it didn't work:
MarkerClusterer.IMAGE_PATH = "/components/com_geommunity3/asset/img/cluster/cluster";

The file that I'm trying to point to is:
[joomla_root]/components/com_geommunity3/asset/img/cluster/cluster.png

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

  • andkit01
  • andkit01's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
24 Jun 2018 06:41 #41780 by andkit01
Replied by andkit01 on topic Custom Cluster Marker Image in Geommunity
Hi,

I figured it out. For ref. in case anyone is interested, steps to customize the cluster marker image/icon:

1) Upload a custom cluster png file, e.g., at [joomla_root]/components/com_geommunity3/asset/img/cluster/cluster1.png
2) Note that the image file should have the number "1" at the end of the filename. (see line 631 of [root]/modules/mod_geommunity3/js/markerclusterer.js file for more info)
3) Edit line 1566 of [root]/modules/mod_geommunity3/js/markerclusterer.js file to set the IMAGE_PATH value:
MarkerClusterer.IMAGE_PATH = './components/com_geommunity3/assets/img/cluster/cluster';

Tested that this works.

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

Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.
Copyright © 2021 Nordmograph - Joomla extensions. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.
Browser of the future