I got ambitious today and using the old PFBCv1 I built or ported LatLng Element for PFBC3 (only tested with php5.3 variant)
and here it is
Put file in PFBC/Element/LatLng.php
it uses the normal prototype (label, name, attributes)
Attributes has a few map specific additions
latlngDefaultLocation - array(lat, lng) (default 41.847, -87.661)
width - width of map in pixels (default 400) (this is also used as a style option for input fields)
height - height of map in pixels (default 250)
hideJump - hide the address search bar (default false)
mapType - type of map to use (default ROADMAP) (Avail options are ROADMAP, SATELLITE, HYBRID, TERRAIN)
updatelat - input that is updated via js for the latitude only value (default none)
updatelng - input that is updated via js for the longitude only value (default none)
value comes from latlngDefaultLocation
here is an example usage,
$form = new PFBC\Form("latlng");
$form->configure(array(
"prevent" => array(
"bootstrap",
"jQuery",
),
));
$form->addElement(new PFBC\Element\LatLng('My Location:', 'mylatlng', array(
'latlngDefaultLocation' => array($row['latitude'], $row['longitude']),
'mapType' => 'HYBRID',
'zoom' => $zoom,
'updateLat' => 'latitude',
'updateLng' => 'longitude',
)));
$form->addElement(new PFBC\Element\Textbox("Latitude:", "latitude", array("value" => $row['latitude'], 'id' => 'latitude')));
$form->addElement(new PFBC\Element\Textbox("Longitude:", "longitude", array("value" => $row['longitude'], 'id' => 'longitude')));
Anyhow hope you like it, I know it's working great for me and I'd love to be able to give back to this project a little. I'm not 100% familiar with your api at all I kinda just jumped in and got it working in a few hours so I'm not claiming I did things the best way, I just took the old code and tried to convert it the best I could, and I added the updateLat/Lng since I needed to get each value separately and this made my like easier, so I wouldn't have to post process it at all. It works with hidden fields too which makes it nice and clean IMHO.
Enjoy and thanks for this class once again.