Skip to content

Commit 7dfa333

Browse files
author
Fabrice Bernhard
committed
[sfEasyGMapPlugin] Package last modifications for final release of v3 !
1 parent e2370ff commit 7dfa333

File tree

2 files changed

+11
-99
lines changed

2 files changed

+11
-99
lines changed

README

Lines changed: 3 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Installation
1414

1515
or in your plugins directory :
1616

17-
$ svn co http://svn.symfony-project.com/plugins/sfEasyGMapPlugin sfEasyGMapPlugin
17+
$ svn co http://svn.symfony-project.com/plugins/sfEasyGMapPlugin/branches/v3 sfEasyGMapPlugin
1818

1919
* Optional: enable the sample module in your `settings.yml`: sfEasyGMapPlugin
2020

@@ -95,101 +95,12 @@ Examples
9595
<?php include_map_javascript($gMap); ?>
9696

9797

98-
* Sample 3
99-
100-
* change the map center location and the zoom level
101-
102-
* change the zoom and movement controls used
103-
104-
* store the markers' javascript objects in a javascript array
105-
106-
* use a custom icon for the markers
107-
108-
* bind event listeners to the markers linked to custom javascript functions
109-
110-
* add custom property to the markers' javascript objects
111-
112-
* In the action:
113-
114-
// parameters: zoom level, lat, lng, options
115-
$this->gMap = new GMap(
116-
array(
117-
'zoom'=>4,
118-
'center_lat'=>45,
119-
'center_lng'=>8,
120-
'control'=>'new google.maps.SmallMapControl()'
121-
)
122-
);
123-
124-
// some places in the world
125-
$coordinates = array(
126-
array(51.245475,6.821373),
127-
array(46.262248,6.115969),
128-
array(48.848959,2.341577),
129-
array(48.718952,2.219180),
130-
array(47.376420,8.547995)
131-
);
132-
133-
// adds a variable "markers" defined on the global level
134-
$this->gMap->addGlobalVariable('markers','new Array()');
135-
136-
// creates a custom icon for markers
137-
$gMapIcon = new GMapIcon(
138-
'nice_icon',
139-
'/sfEasyGMapPlugin/images/nice_icon.png',
140-
array(
141-
'width'=>18,
142-
'height'=>25,
143-
'info_window_anchor_x'=>9,
144-
'info_window_anchor_y'=>25
145-
)
146-
);
147-
148-
// creates two custom event listeners
149-
$gMapEvent1 = new GMapEvent(
150-
'mouseover',
151-
"document.getElementById('console_div').innerHTML = 'Mouse over marker number '+this.num;"
152-
);
153-
$gMapEvent2 = new GMapEvent(
154-
'mouseout',
155-
"document.getElementById('console_div').innerHTML = '';"
156-
);
157-
158-
foreach ($coordinates as $key=>$coordinate)
159-
{
160-
// parameters: lat, lng, marker's javascript object's name, icon object
161-
$gMapMarker = new GMapMarker($coordinate[0],$coordinate[1],'markers['.$key.']',$gMapIcon);
162-
$gMapMarker->addHtmlInfoWindow('<b>Coordinates:</b><br />'.implode(', ',$coordinate));
163-
// will add a custom property to the marker's javascript object
164-
$gMapMarker->setCustomProperty('num',$key);
165-
// binds the event listeners to the marker
166-
$gMapMarker->addEvent($gMapEvent1);
167-
$gMapMarker->addEvent($gMapEvent2);
168-
169-
$this->gMap->addMarker($gMapMarker);
170-
}
171-
172-
* In the template:
173-
174-
<?php use_helper('Javascript','GMap') ?>
175-
176-
<?php include_map($gMap,array('width'=>'512px','height'=>'400px')); ?>
177-
178-
Search on the map:
179-
<?php include_search_location_form() ?>
180-
<br />
181-
<br />
182-
<div id="console_div" style="font-size:large"></div>
183-
184-
<!-- Javascript included at the bottom of the page -->
185-
<?php include_map_javascript($gMap); ?>
186-
187-
18898

18999
TODO
190100
----
191101

192-
* make the javascript more compact
193102
* correct javascript files that suppose that the map's javascript object is called 'map'
194103
* add support for EncodedLines
195104
* add support for custom zoom and move controls
105+
* add support for Directions
106+
* add support for Labeled markers

package.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323
<active>yes</active>
2424
</developer>
2525
<developer>
26-
<name>Tom Haskins-Vaughan</name>
27-
<user>tsmTom</user>
28-
<email>tom@templestreetmedia.com</email>
26+
<name>Maxime Picaud</name>
27+
<user>chok</user>
28+
<email>chokorp@gmail.com</email>
2929
<active>yes</active>
3030
</developer>
31-
<date>2009-05-03</date>
32-
<time>18:30:00</time>
31+
32+
<date>2009-10-16</date>
33+
<time>16:30:00</time>
3334
<version>
34-
<release>1.0.4</release>
35-
<api>1.0.4</api>
35+
<release>3.0.0</release>
36+
<api>3.0.0</api>
3637
</version>
3738
<stability>
3839
<release>stable</release>

0 commit comments

Comments
 (0)