Support » Plugin: Basic Google Maps Placemarks » [Plugin: Basic Google Maps Placemarks] Custom icon/markers

Viewing 11 replies - 1 through 11 (of 11 total)
  • Joyce

    (@catherinejoyce)

    +1

    I second that

    A great idea if feasible – I spend a reasonable time when creating each placemarker just browsing/searching the media library for and inserting the custom marker I want, a simple paste into a URL field would certainly speed things up.

    +1

    Plugin Author Ian Dunn

    (@iandunn)

    I agree that WordPress’ current media library isn’t very efficient, but I think it’s important for plugins to use the core architecture as much as possible. I think that the media library is going to be getting a lot more attention in the next few WordPress releases, and hopefully that will make this process quicker.

    I also think that a lot of users wouldn’t want to paste in the URL, because they’re not familiar with what a URL is and how to get it. Also, the URL could break if the site is moved to a different URL.

    Can you guys describe the problem you have with the current method? There may be a better have to handle it.

    Also, if you’re using the same icon for all placemarks, you can easily setup a filter to do change the default icon, and then you wouldn’t have to set the featured icon at all. See the FAQ for details on that.

    Thread Starter OC2PS

    (@sooskriszta)

    To tell you the truth, I just didn’t know the “featured images” method. So basically, I didn’t know how to set custom markers short of changing the functions.php of my theme.

    Now that I have figured it out, there doesn’t seem to be a big problem, though media library could be more efficient.

    I would strongly recommend enabling users to change the default marker in the plugin’s admin/config, though (as opposed to editing theme’s function.php).

    Also, would be nice if you can enable animations like http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/ does.

    What is the “featured images” method?

    Thread Starter OC2PS

    (@sooskriszta)

    WordPress allows you to assign featured images to posts. You will see a button in bottom right corner of the edit post page.

    If you assign an images as featured image for a placemark, it will appear as its marker on the map.

    Hi Ian

    I have tried to set up an alternative default icon following your instructions at the end of the FAQ, but I can’t get it to work. I expect that I either haven’t got the pathing to my new default icon correct, or I’m inserting the URL in the wrong place. Would you mind confirming where and how the “full URL to the new icon” should be put in the function?

    Using your first example in the FAQ, I thought the URL should go in the function’s “return get_bloginfo” line, like this

    return get_bloginfo( 'stylesheet_directory' ) . 'http://www.mydomain/images/mydefaulticonname.png';
    but the icon is not found and so the marker doesn’t appear on the map.

    Thanks in advance for any advice you can offer.

    Ridgididgi

    Plugin Author Ian Dunn

    (@iandunn)

    No, the get_bloginfo( 'stylesheet_directory' ) part is going to be translated to something like ‘http://your-domain.net/wp-content/themes/your-theme/’, so you want to do something like

    `return get_bloginfo( ‘stylesheet_directory’ ) . ‘/images/mydefaulticonname.png’;

    and then put the image inside the ‘/wp-content/your-theme/images/’ directory.

    Or, you could do something like

    return 'http://www.mydomain/images/mydefaulticonname.png';

    and put the image in the /images directory.

    Many thanks for correcting my muddled understanding, Ian – much appreciated.

    It is all working properly now 🙂

    Happy New Year!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Basic Google Maps Placemarks] Custom icon/markers’ is closed to new replies.