myGeoBook is about geolocation & social media,  with a set of tools for any website developer to use. Maps maybe sexy to some people and yes everyone is talking about mobile location services right now Foursquare anyone).

Here’s a very short guide on how to add a map to WordPress using myGeoBook - but first, here’s an example. This map is based on the Frommers best restaurants in Europe.

Code Sample

<iframe src="http://mgbembeddedmap.mygeobook.com/Map.aspx?profileId=1162&amp;showSearch=true&amp;autoZoomAndCenter=false&amp;zoom=2&amp;mapStyle=aerial border="0" width="565" height="420" frameborder="0"></iframe>

You just need to remember to wrap your URL in an iFrame tag

Parameters to configure your myGeoBook maps

Parameters you can use

  • profileId - the id of the profile to be loaded on the map. You can also specify a list of profiles separating the ids by comas. Examples: profileId=1069 or profileId=1069,1082

  • mapStyle - represents the style of the map. Only applies when the Bing map engine is used. Valid values are: road, aerial and hybrid (aerial including labels). Default value is road.

Code Sample - mapStyle=road

<iframe src="http://mgbembeddedmap.mygeobook.com/Map.aspx?profileId=1162&amp;showSearch=true&amp;autoZoomAndCenter=true&amp;zoom=2&amp;mapStyle=road border="0" width="565" height="420" frameborder="0"></iframe>

  • autoZoomAndCenter - boolean flag (allows only the true or false values) which specifies if the embedded map should auto center and zoom on the displayed profiles. Default value is true.

  • zoom - the zoom level to be used by the map. The value is dependent on the map engine. For Bing maps the zoom values must be integers from 1 (max zoom out) to 19 (max zoom in). To prevent the embedded map from rezooming when loading the profiles, set the autoZoomAndCenter to false.

Code Sample - autoZoomAndCenter=true&zoom=5

<iframe src="http://mgbembeddedmap.mygeobook.com/Map.aspx?profileId=1162&amp;showSearch=true&amp;autoZoomAndCenter=true&amp;zoom=5&amp;mapStyle=road border="0" width="565" height="420" frameborder="0"></iframe>

  • centerLat and centerLon - the GPS coordinates for the point where you want to center the map. You supply either both values, either none. To prevent the embedded map from applying automatic zoom and center behavior, set the autoZoomAndCenter parameter to false. Examples: centerLat=51.4¢erLon=0&autoZoomAndCenter=false&zoom=8

  • centerPoiId - the id of the MGB Point of Interest on which to center the map. To prevent the embedded map from applying automatic zoom and center behavior, set the autoZoomAndCenter parameter to false. Examples:centerPoiId=481&profileId=1085&autoZoomAndCenter=false&zoom=6

  • showSearch - displays the search control for performing full text search on the map POIs. The default value is false. Example: showSearch=true

  • centerByIp - if set to true the embedded map will be centered on the location given by the user’s current IP address. The default value is false. If this parameter is set to true, the following parameters will be ignored: autoZoomAndCenter, centerLat, centerLon. Example: centerByIp=true

  • mgbStyle - posible values: map, list. Allows the user to choose the way points of interest are displayed. In map mode, the points are displayed on a map, in list mode they are displayed inside a paginated list. Default value: map.

  • showListLink - if true, a link to the list view mode of the map will be displayed. If the control is in list mode, a link to the map view mode will be displayed. Default value: false.

Tags: geolocation, maps, myGeoBook

Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.

Meet the author

Photo for Damien Saunders
Damien Saunders
An experienced management consultant and business leader interested in digital transformation, product centred design and scaled agile. If I'm not writing about living with UCTD (an autoimmune disease), I'm probably listening to music, reading a book or learning more about wine.