Title: Illegal string offset
Last modified: August 21, 2016

---

# Illegal string offset

 *  Resolved [BIC001](https://wordpress.org/support/users/bic001/)
 * (@bic001)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-offset-1/)
 * Hi,
 * I’m hoping somebody out there might be able to help me with a problem.
 * I’ve installed the plugin “Google Maps GPX Viewer” and can get the maps to show
   OK in my pages OK. However, I’m having trouble adding a kml file.
 * The kml shows up OK on the map OK, but I have an error message above the map (
   which shows on the published page):
    ** _“Warning: Illegal string offset ‘elevation’
   in /mounted-storage/home150/sub004/sc80517-LQIL/bushandisland.net/wp-content/
   plugins/google-maps-gpx-viewer/php/kml\_layer.php on line 22”_
 * Can anyone give any advice on what the problem might be ?
 * Many Thanks
 * [http://wordpress.org/extend/plugins/google-maps-gpx-viewer/](http://wordpress.org/extend/plugins/google-maps-gpx-viewer/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [13 years ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719343)
 * KML needs an absolute path like: [http://www.xyz.tr/upload/test.kml](http://www.xyz.tr/upload/test.kml)
 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [13 years ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719344)
 * resolved!
 *  [VaDims](https://wordpress.org/support/users/vadims00/)
 * (@vadims00)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719444)
 * Hello Bernd
    I’m having the same error when using absolute path to kml file on
   localhost. Is there any other reason to this?
 * Thanks!
 *  [Journey2Holland](https://wordpress.org/support/users/journey2holland/)
 * (@journey2holland)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719446)
 * I’ve got the same problem. I start using php 5.4 to solve some problems with 
   plugins, but now after I start using php 5.4 I get the message below on top of
   every page with a map from Google.
 * Warning: Illegal string offset ‘elevation’ in /home/robdeen52/domains/journey2holland.
   com/public_html/wp-content/plugins/google-maps-gpx-viewer/php/kml_layer.php on
   line 22
 * Every KML-file has an absolute path. Does anyone know how to solve this problem?
 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719447)
 * try to replace line 22 in kml_layer.php with:
 * if($elevationProfile == “true” || $downloadLink == “true” ) {
 * and drop me a line if it works!
 *  [Journey2Holland](https://wordpress.org/support/users/journey2holland/)
 * (@journey2holland)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719448)
 * With:
    if($elevationProfile == “true” || $downloadLink == “true” ) {
 * I got this message:
    _This plugin has been deactivated because your changes resulted
   in a fatal error._
 * Parse error: syntax error, unexpected end of file in /home/robdeen52/domains/
   journey2holland.com/public_html/wp-content/plugins/google-maps-gpx-viewer/google-
   maps-gpx-viewer.php on line 179
 * After that I tried:
    if($elevationProfile == “true” || $downloadLink == “true”)
 * The plugin updated successfully, but I still have the message about Illegal string
   offset ‘elevation’ … on line 22 on my website.
 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719449)
 * that’s how I tested:
 * if($elevationProfile == “true” || $downloadLink == “true” ) {
    // if($map_id[‘
   elevation’] || $map_id[‘download’]) {
 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719450)
 * Maybe it is because google elevation service fails by the moment as you can [verify here…](https://developers.google.com/maps/documentation/javascript/examples/elevation-simple?hl=de)
 *  Plugin Author [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * (@bernd-altmeier)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719451)
 * google elevation service back again 2013-08-17 15:00 UTC

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Illegal string offset’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-maps-gpx-viewer_c3d0cb.svg)
 * [Google Maps GPX Viewer](https://wordpress.org/plugins/google-maps-gpx-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-maps-gpx-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-maps-gpx-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/google-maps-gpx-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-maps-gpx-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-maps-gpx-viewer/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Bernd Altmeier](https://wordpress.org/support/users/bernd-altmeier/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/illegal-string-offset-1/#post-3719451)
 * Status: resolved