Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

Google Maps full API - polyline


4 Posts   1558 Views


9 June 2009 at 9:11am Community Member, 180 Posts


is there any way to drawing polyline in back-end ?

for example:
1. create new Tour Page
2. in tab called Google Maps is form to puts geometric values of the new point on the map
3. in the same Google Maps tab is a button called "create another point" - generate new input type text (2x) (some JQuery, AJAX ?)
4. than i have for example 10 points
5. in front-end i genarate polyline on base these points


10 June 2009 at 1:49pm Community Member, 712 Posts

It's certainly possible - I'm doing something similar with polygons and OpenLayers.

Basically you need to create a composite field that consists of the map and the hidden field that stores a serialized version of the line. You'll need to write the javascript to create the line creation interface and writing the data to the hidden field, then when the field is saved, store it as a polyline (have a look at the GIS module for an idea of how to go about doing this). This way, it is a format that is relatively easy to populate google maps again later.

This should get you started - it's an involved process, but is doable. Definitely have a look at the GIS module!

Of course, if you interested in paying someone to do it, I specialize in GIS services ;-D.


15 June 2009 at 2:40am Community Member, 180 Posts

I downloaded it but after db/build i don't have any new PageType

so ? how to use it ?

SS 2.3.1.


15 June 2009 at 8:44am Community Member, 712 Posts

The GIS module doesn't contain any new page types. It contains the database fields, form fields, search filters and a few other bits and pieces that you need to start creating your own GIS-enabled objects.

For example:

class Office extends DataObject {

   static $db = array(
      'Name' => 'Varchar(40)',
      'Location' => 'GeoPoint'


Like I said, you'll need to look at the code. I also suggest you read this:


Note that there is also a "Maps" module (specifically for google maps) that might be more useful for you.