{ Dev Farm }

Web & Windows Development

Updating from XML Google Maps

Home Forum Wp Gpx Maps Support Updating from XML Google Maps

  • Questo topic ha 3 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 10 anni, 9 mesi fa da max.
Stai visualizzando 4 post - dal 1 a 4 (di 4 totali)
  • Autore
    Post
  • #22907 Rispondi
    Dominic
    Ospite

    Hi,

    I’ve been using XML Google Maps for the last couple of years, but am much happier with your plugin so am going to use it instead. The problem is I have 350+ posts where to show the map I just put in `<a href=”http://onebikeoneworld.com/gps/20130708a.gpx”&gt; </a>
    ` and instead of having to go through and change them all by hand, I was wondering if you had any idea of how to update them?

    Secondly, if I turn off the cache it reloads it on every single attempt, right? I have an overview map of my trip that I update every few days, is there any half-way option? For example keeping a record of the last time the file was updated and comparing it to the file that was used to create the cache?

    Thank you,
    Dominic

    #22908 Rispondi
    max
    Amministratore del forum

    Hi Dominique, I hope you have at least a little regular expression and database skills..
    The easiest way to migrate your old shortcodes is export your database and replace all shortcodes with a regular expression like this
    RegEx: <a[^>]+href=([””‘])(.*?\.gpx)\1[^>]?>\s?</a>
    Replace: [sgpx gpx=”\2″]
    (tested with Notepad++)
    and restore the new database..

    This regular expression will replace all links with a href that ends with .gpx with the new shortcode (it might be optimized)

    You have to know, this is a risky operation and I suggest to keep a copy of the original database!

    Don’t worry about the cache, the plugin is fast even without cache.. the only (very)slow process is to download the file from an http url, this thing depends on your hosting internet connection.

    #22914 Rispondi
    Dominic
    Ospite

    Spectacular! Updated and seems to be working. My only suggestion that I have now is that you implement an opacity setting for the lines on the map. Thank you again

    #22915 Rispondi
    max
    Amministratore del forum

    I’m glad it worked out! :yahoo: :good:

Stai visualizzando 4 post - dal 1 a 4 (di 4 totali)
Rispondi a: Updating from XML Google Maps

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Le tue informazioni:




Non è possibile lasciare nuovi commenti.