-
- 293 Posts
LocationResources is a new(ish) Extra for MODX Revolution that adds a user-friendly drag-and-drop map to the create/update resource pages in the manager. It's a special Custom Resource Class (CRC) with its own database table so there's no need for TVs. You just need to create a "Location Resource" instead of a standard document resource.
https://modx.com/extras/package/locationresources
Version 1.3 brings support for multiple markers displayed on the same map from other Location Resources with clustering.
You can install it via the MODX package manager.
Before it's usable, you need to get a Google Maps API key from
https://developers.google.com/maps/documentation/javascript/get-api-key
and then add it to the LocationResources system settings.
You can find an almost complete tutorial at:
https://www.hkwebdeveloper.com/locationresources.html
If anyone encounters any issues post here and I'll try to help you out.
If you find a bug, please report it at
https://github.com/digitalpenguin/LocationResources
Cheers!
[ed. note: muzzstick last edited this post 6 years, 7 months ago.]
-
- 115 Posts
Hi Murray, this looks interesting.
I've got a little project coming up that I'm planning to use MIGXDB for and there is also a requirement to be able to add multiple maps with markers and some info with each.
Would it be possible to integrate this into the CMP of MIGXDB so every time I add additional information (new data) to the database I could also include lat long coordinates that can be called into a locationResources map on the front end via the schema id of any particular resource held in the MIGXDB?
Or run a loop collection that displays the data from a MIGXDB inclusive of a map importing the lat long, title and description?
Or maybe you have a better suggestion for how to use locationResources in a CMP?
-
- 293 Posts
Hey jimmyjazz,
LocationResources has it's own custom db table called modx_location_profile
https://github.com/digitalpenguin/LocationResources/blob/master/core/components/locationresources/model/schema/locationresources.mysql.schema.xml
It's been a while since I used migxdb but that's where you can access the stored data. The "location" field should hold the id of the resource it belongs to.