Map icon not rendered
-
Hi,
There is a bug that prevents the icon marker from being loaded. The URL of the marker is constructed incorrectly:
The correct URL would be:
http://example.com/wp-content/plugins/codepeople-post-map/images/icons/temple-2.png
The problem seems to be caused by the function _set_map_point if the URL saved as value of $icon starts with the protocol-agnostic prefix “//”. With a little change I manage to get the icon working again:
if( strpos( $icon, 'http' ) !== 0 && substr( $icon, 0, 2 ) !== '//' ) $icon = CPM_PLUGIN_URL.$icon;
(Note: I don’t actually understand the meaning of the strpos condition – why should CPM_PLUGIN_URL be prepended if there is already “http” in the URL? Maybe a typo, should it be “=== 0”?)
Thanks!
- The topic ‘Map icon not rendered’ is closed to new replies.