If you're gonna be using this in CakePHP just follow the convention (which is already set up distributed in the folders you see). Now, with the mapscript you can do two things; have a map and display a bunch of pins and in case you have a form in which you require to enter a map's coordinates, it draws a map with a pin, then it puts the coordinates of the pin after you drag-let-go.
- Use this thing.
- Download mootools-core-1.4.5-full-nocompat.js.
- For the map's company icon, it will be located at 'root/icos/company_pin_icon.png' (preferable png for the alpha channel).
- Your database will have to contain a table named 'locations' with 9 rows named precisely as follows:
- 'id' type int, bool and auto-increment.
- 'title' type tinytext (or whatever you need).
- 'description' type text*.
- 'date' type text*.
- 'latitude' type double.
- 'longitude' type double.
- 'image' type tinytext*.
- 'created' type datetime*.
- 'edited' type datetime*.
- As you can see in the index.html file that's the basic thing you need for the js to display pins.
- As for the part where it enters coords in your form fields, either you modify the js or follow the convention as follows:
- Your input elements will have to contain id's (if more, please, please use class instead).
- <input id="LocationLatitude"...
- <input id="LocationLongitude"...
- I think that's enough, it's a really simple thing to set up anyway, you'll find your way around it.