for Drupal 6
Getlocations will provide a Google maps API version 3 enabled map on which to
display markers of locations found in location-enabled content-types.
INSTALL
Before installing getlocations please ensure that you have location and
libraries modules installed
You can fetch markers from dropbox:
As tarballs:
http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers.tar.gz
http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers-extra.tar.gz
As zipfles:
http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers.zip
http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers-extra.zip
Download the file(s) and place them into your libraries folder so you have
a path something like this:
sites/all/libraries/getlocations/markers
The 'extra' files contain numbered and letter markers.
You can optionally add these if you need them.
CONFIGURE
You should configure Getlocations by visiting admin/settings/getlocations.
USAGE
Getlocations maps can be displayed per node, eg "/getlocations/node/xxx"
will display all the locations associated with that node.
They can also be displayed per content-type, so if your content-type
has a machine name 'venue' you can show them all with
"/getlocations/type/venue".
With the above path you can add another two parameters which must be a
location key/value pair, so "/getlocations/type/venue/city/london" will
give you all the locations in London. The keys might typically be
lid
name
street
additional
city
province
postal_code
country
latitude
longitude
province_name
country_name
If you need more complex things use Views.
You can show all the location enabled users with a path
"/getlocations/users"
and you can show a single user with
"getlocations/user/xxx" where "xxx" is the user uid
The getlocations user features have their own permissions so you can restrict
access according to your needs.
You can display a list of location ids with something like
"getlocations/lids/1,2,3,4"
and a list of nodes with
"getlocations/nids/1,2,3,4"
There are some Views, disabled by default.
The getlocations View will provide a block that will appear when a location
enabled node is being shown. The block contains a link to a map.
getlocations_user View does the same for users.
Automatic Panning
This setting has 4 possibilities:
"None" is No panning.
This uses the default zoom and map center.
"Pan" keeps the markers in the Viewport.
This will try to fit the markers in by panning to them but uses
the default zoom.
"Pan and zoom" fits the markers to the Viewport.
This zooms in as far as it can and will fit all the markers onto the map.
This setting should only be used if you have less than 30 - 50 markers.
"Set Center" places the markers in the middle of the map.
This is similar to "Pan" but uses averaging to define the map center.
Which of these settings is best for your usecase depends on how many markers
you have and their 'spread', eg are they all in one region or spread out all
over the world.
Showing more than 30 -50 markers could lead to browser crash, remember that
it is the client browser not the server that is doing the work so you need to
test on slow machines and basic handheld devices to determine the best
settings for your site.
If you have hundreds of markers make sure that the markermanager is enabled and
that the markers are not all in the viewport at once, at least not on the map
as it is initially set up.
This applies especially to the
"/getlocations/type/zzz"
map which shows all the markers (of a given content-type)
If you have the Colorbox module installed and enabled in Get Locations
you can place any of the above paths in a colorbox iframe by replacing
'getlocations' with 'getlocations_box'.
To enable this for a link you can use the 'colorbox-load' method,
make sure that this feature has been enabled in colorbox
and use a url like this:
<a href="/getlocations_box/node/xxx?width=700&height=600&iframe=true" class="colorbox-load">See map</a>
or (advanced use) by adding rel="getlocationsbox" to the url, eg
<a href="/getlocations_box/node/xxx" rel="getlocationsbox">See map</a>
The last method uses the settings in administration/settings/getlocations for colorbox
and uses its own colorbox event handler, see getlocations_colorbox.js. You can define your own
event handlers in your theme's javascript.
'getlocations_box' has it's own template, getlocations_box.tpl.php which can be
copied over to your theme's folder and tweaked there.
View source
- for Drupal 6
- Getlocations will provide a Google maps API version 3 enabled map on which to
- display markers of locations found in location-enabled content-types.
-
- INSTALL
- Before installing getlocations please ensure that you have location and
- libraries modules installed
-
- You can fetch markers from dropbox:
- As tarballs:
- http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers.tar.gz
- http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers-extra.tar.gz
-
- As zipfles:
- http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers.zip
- http://dl.dropbox.com/u/41489105/Drupal/getlocations/getlocations-markers-extra.zip
-
- Download the file(s) and place them into your libraries folder so you have
- a path something like this:
- sites/all/libraries/getlocations/markers
-
- The 'extra' files contain numbered and letter markers.
- You can optionally add these if you need them.
-
- CONFIGURE
- You should configure Getlocations by visiting admin/settings/getlocations.
-
- USAGE
- Getlocations maps can be displayed per node, eg "/getlocations/node/xxx"
- will display all the locations associated with that node.
-
- They can also be displayed per content-type, so if your content-type
- has a machine name 'venue' you can show them all with
- "/getlocations/type/venue".
-
- With the above path you can add another two parameters which must be a
- location key/value pair, so "/getlocations/type/venue/city/london" will
- give you all the locations in London. The keys might typically be
-
- lid
- name
- street
- additional
- city
- province
- postal_code
- country
- latitude
- longitude
- province_name
- country_name
-
- If you need more complex things use Views.
-
- You can show all the location enabled users with a path
- "/getlocations/users"
- and you can show a single user with
- "getlocations/user/xxx" where "xxx" is the user uid
-
- The getlocations user features have their own permissions so you can restrict
- access according to your needs.
-
- You can display a list of location ids with something like
- "getlocations/lids/1,2,3,4"
- and a list of nodes with
- "getlocations/nids/1,2,3,4"
-
- There are some Views, disabled by default.
- The getlocations View will provide a block that will appear when a location
- enabled node is being shown. The block contains a link to a map.
-
- getlocations_user View does the same for users.
-
- Automatic Panning
- This setting has 4 possibilities:
- "None" is No panning.
- This uses the default zoom and map center.
-
- "Pan" keeps the markers in the Viewport.
- This will try to fit the markers in by panning to them but uses
- the default zoom.
-
- "Pan and zoom" fits the markers to the Viewport.
- This zooms in as far as it can and will fit all the markers onto the map.
- This setting should only be used if you have less than 30 - 50 markers.
-
- "Set Center" places the markers in the middle of the map.
- This is similar to "Pan" but uses averaging to define the map center.
-
-
- Which of these settings is best for your usecase depends on how many markers
- you have and their 'spread', eg are they all in one region or spread out all
- over the world.
-
- Showing more than 30 -50 markers could lead to browser crash, remember that
- it is the client browser not the server that is doing the work so you need to
- test on slow machines and basic handheld devices to determine the best
- settings for your site.
-
- If you have hundreds of markers make sure that the markermanager is enabled and
- that the markers are not all in the viewport at once, at least not on the map
- as it is initially set up.
- This applies especially to the
- "/getlocations/type/zzz"
- map which shows all the markers (of a given content-type)
-
- If you have the Colorbox module installed and enabled in Get Locations
- you can place any of the above paths in a colorbox iframe by replacing
- 'getlocations' with 'getlocations_box'.
- To enable this for a link you can use the 'colorbox-load' method,
- make sure that this feature has been enabled in colorbox
- and use a url like this:
- See map
-
- or (advanced use) by adding rel="getlocationsbox" to the url, eg
- See map
-
- The last method uses the settings in administration/settings/getlocations for colorbox
- and uses its own colorbox event handler, see getlocations_colorbox.js. You can define your own
- event handlers in your theme's javascript.
- 'getlocations_box' has it's own template, getlocations_box.tpl.php which can be
- copied over to your theme's folder and tweaked there.
-