ATLsoft

ATLsoft

Softwareentwicklung | Consulting | Qualitätsmanagement

Google Maps WordPress Plugin

| 301 Comments

Mit diesem Plugin ist es einfach den Google Kartendienst in Artikel und Seiten einer WordPress Installation einzubauen.

Hier die Liste der Funktionen, die sich mit dem Karten-Manager konfigurieren lassen.

Das Zeichnen von Tracks und Wegpunkten mit dem Editor ist als Demo der Installation beigefügt und als Pro-Version verfügbar.

Plugin Download bei WordPress.org: Google-Maps-GPX-Viewer

Map buttonHier wird der Karten-Manager Karten-Manager im WordPress Editor gestartet.

 

 

 

 

 

 

 

Alle Funktionen sind über die Reiter des Dialogfensters erreichbar.

Als Administrator kann man unter Einstellung Google Maps einige andere Einstellungen vornehmen und externe WMS-Kartenserver einbinden.

Wer sich mit den WordPress ShortCodes auskennt kann diese auch direkt angeben, ansonsten erledigt das der Karten-Manager. Hier ein paar Beispiele.

Now it is easy to use Google Maps inside WordPress. Here’s the Plugins feature list:

Drawing tracks and waypoints directly inside the map instead of using GPX are features of the Pro-version.

Plugin download: Google-Maps-GPX-Viewer

Map buttonHere you’ll start the plugins Map-Manager.Map manager

 

 

 

 

 

 

 

All map settings are done through the map managers user interface.

There are some more settings inside the admins Settings Google Maps area. Here you may setup external WMS, OsGeo Web-Map-Service or OSM Open-Street-Maps to your WordPress Blog.

If you know how to use WordPress ShordCodes you may put them directly into your posts, otherwise the map manager will do this for you. Here are some sample maps.

 

ShortCode:
[map lat=51.493 lon=7.45 z=15 maptype=satellite]

 

ShortCode:
[map address="Alexanderplatz, Berlin, Germany" z=15 marker="yes" markerimage="/img/fturm.png" infowindow="Berlin Alexanderplatz" style="width:610px; height:250px; border:1px solid gray; margin-left:20px; float:right;"]

ShortCode:
[map maptype=OSM gpx="/tracks/Marker-Manager.gpx" style="width:610px; height:250px; border:1px solid gray;"]

ShortCodes

  • maptype=”OSM” select maptype roadmap, terrain, satellit, hybrid, Relief, OSM, ‘OSM cycle’, WMS
  • pano=”yes” Google Panoramio Images Layer
  • panotag=”tag/user-id” selects Ponoramio images by tag or user ID
  • style=”width:300px; height400px; margin:20px” must be css conform
  • gpx=”direct or absolute path to the gpx-file”
  • kml= “absolute path to the kml-file”
  • elevation=”yes/no” depends on the option settings
  • download=”yes/no” depends on the option settings
  • fusion=”<table id>;<geoLocation-field>;<condition>”
  • address=”Berlin, Germany” location by geocoded address
  • lat=”51.093″ lon=”7.23544” location latitude/longitude
  • z=”15” set zoom level (0-20) depends on maptype
  • marker=”yes” add location marker
  • markerimage=”URL” add custom marker image
  • infowindow=”text to be published” add Infowindow
  • traffic=”yes” add googles traffic layer
  • bike=yes add googles bicyle layer

 

FAQs

301 Comments

  1. Is it possible, e.g. via a CSS/style definition, to define the color of a track on the map? As far as I can see, color is assigned automatically and different tracks are painted in different color, but the use-case for my blog would be one track is most cases and a user request is to define the color (default seems to be red for the first track.

  2. I’m only seeing a white box with no map in it. Any ideas what might be wrong?

  3. I really love your plugin, it does exactly what I was looking for. Just one problem I recognized: when I use the plugin like in http://www.sandra-ficht.de/1119/tag-1-big-meadow-trailhead-bis-dardanelles-lake/ everything works fine on my PC. On my Android mobile however, I get the following error message instead of the altitude graph: “Cannot set property ‘overflow’ of null”. (It works fine on iPhone 5 – might it be a question of screen resolution? My android device has a rather poor resolution.)

    • The elevation profile is done by googles corechart. So why and where they use “overflow:null” only google knows. I never used “overflow:null” in my code.

  4. Thanks for the quick reply.

    It sounds easy, but when I add the shortcode to the page, the map itself appears , but without the kml file, and I get the following error above the map:

    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

    Any ideas what I’, doing wrong ?

  5. Hi,

    I’m new to WordPress, but have installed your map OK, which is great.

    I now want to add a KML file which I have uploaded to my site. As far as I can understand, I neet to insert a shortcode kml= “absolute path to the kml-file” …..in my case [kml= “www.bushandisland.net/wp-content/routes/beaver_float.kml”].

    Can you please tell me in simple terms, wher this code should be placed ?

    Thanks for your help.

    • Shortcodes have to start with “[map" so insert [map kml= “www.bushandisland.net/wp-content/routes/beaver_float.kml”] anywhere inside the post or use the map manager button inside the wp-editor.

  6. Improted gpx file from open runner does not give correct distance in the block below the map. Says distance is 87 km when actually is 43.5 km. In map Info window correct distance is shown.
    Have a look at http://milslukaren.se/?page_id=76
    In all other respects a simple and functional plug in. I think.

    • as you can see on the elevation profile, your file contains the track twice. One is tagged as route the other as track. If you delete one of them, all should be OK.

  7. with maptype=”OSM” there is shown googles terms of use instead of OSM.
    you can see this bug on your website http://www.atlsoft.de/google-maps-gpx-viewer/ under the shortcode section.

  8. I not sure I get this – Is there a way to show a map with ALL the locations that is in my post/pages, like a map with a location in on every map, and then a page with a map that showes them all together like a collection? – but a cool plugin anyway

  9. The elevation profile is not displayed correctly in IE. You can see that its is dropped below the map and covers text below it. It works fine in chrome and FF

  10. Hi,

    I have Waypoints in my GPX file as described in your FAQ to show custom Symbols: sym_11.png, sym_12.png etc. After updating to V 2.7 my maps only display sym_1.png, ingnoring the sym-tag in the GPX-WPTs. Example: http://www.bergmofa.de/karte-lamsenjoch/ – any idea?

    Regards, Joachim

Leave a Reply

Required fields are marked *.

*


− six = 3