Maps Documentation

Updating from SL GoogleMaps for EE1.x

Maps began as a port of Experience Internet's SL GoogleMap ExpressionEngine 1.x fieldtype.

There is a built updater for legacy SL GoogleMap fields found in your EE2.x site. (ie. if you've updated your site from EE1.x to 2.x). If any SL GoogleMap fields are found in your database, on installation, these will be converted to Maps fields.

From a front-end perspective, all the old SL GoogleMap template tags will continue to work. The actual internal Google Maps handling has been updated to use the Google Maps v3 api, and if you're using the built in direct map output, you'll need to adjust your script paths as appropriate.

Specifically, if you had the following for SL GoogleMaps :

<!-- Include the libraries -->
<script type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script type="text/javascript"
    src="http://maps.google.com/maps?file=api&v=2.x&key=YOUR_API_KEY&sensor=false"></script>
<script type="text/javascript"
    src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=YOUR_API_KEY"></script>

<!-- Include the SL Google Map JS -->
<script type="text/javascript"
    src="/system/extensions/fieldtypes/sl_google_map/js/global_script.js"></script>

You'd need to update it to have these new paths :

<!-- Include the libraries -->
<script type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script type="text/javascript"
    src="{exp:maps:google_maps_lib_url}">
</script>

<!-- Include the Google Map JS -->
<script type="text/javascript"
    src="{exp:maps:global_script_lib_url}"></script>

Note: The {exp:maps:google_maps_lib_url} simply returns the url for the google maps library with your api_key as set in the fieldtype settings. The {exp:maps:global_script_lib_url} tag returns the path to your third party themes folder. If you'd prefer to set this yourself without the tags, that's fine too.

Alternatively you can supply the paths directly, which are as follows : (be sure to replace YOUR_API_KEY with your api key, and change the third_party theme path if you've changed it on your install)

<!-- Include the libraries -->
<script type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script type="text/javascript"
    src="//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false">
</script>

<!-- Include the Google Map JS -->
<script type="text/javascript"
    src="/themes/third_party/maps/global_maps.js"></script>

Support

Having problems setting up and/or using Maps? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.