Google XML Sitemaps
Using XML sitemap to create a geositemap? (1 post)

  1. RobertHarm
    Posted 4 years ago #

    I am the developer of the mapping plugin http://www.mapsmarker.com and would like to add a geo sitemap in one of the next versions
    Best would be to use your plugin to add the map info to the generated sitemap.xml-file from Google XML site map with the following function:

    function lmm_add_markers_to_sitemap() {
        if (lmm_is_plugin_active('google-sitemap-generator/sitemap.php')){
            $start = round(microtime(true),4);
            global $wpdb;
             $generatorObject = &GoogleSitemapGenerator::GetInstance();
            $markers = $wpdb->get_results("SELECT id FROM '.$table_name_markers.' ORDER BY createdon DESC");
            foreach ($markers as $marker) {
                $georsslink = LEAFLET_PLUGIN_URL . "leaflet-georss.php?marker=" . $marker['id'];
            $end = round(microtime(true),4);

    Unfortunately this is not working as GeoSitemaps require an additional namespace within the <urlset>-tag:
    xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0" and I would need a function like AddGeoURL()
    which adds the maps to the sitemap like this:


    The output for this function could be triggered by code like this:

    foreach ($markers as $marker) {
                $georsslink = LEAFLET_PLUGIN_URL . "leaflet-georss.php?marker=" . $marker['id'];

    you write in the your post about the beta version, that there is a new API which developers can build upon.
    Is the usecase I am describing above possible with the API?
    Thanks for any help!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google XML Sitemaps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by RobertHarm
  • This topic is not a support question
  • WordPress version: 3.3.1