coordinatepicker Widget to pick coordinates using google map in modal window

  1. Requirements
  2. Usage
  3. Changelog
  4. Resources

Widget that allows to pick coordinates using google map in modal window

Requirements

Tested on Yii 1.1.10, but shoul work on previous versions too.

Usage

  1. Checkout source code to your project, for example to ext.coordinatepicker.
  2. Render inputs.
  3. Register script with widget.

Example:

Coordinate inputs: Inputs

Picker popup: popup

echo $form->textField($model, 'lat');
echo $form->textField($model,'long');

$this->widget('ext.coordinatepicker.CoordinatePicker', array(
    'model' => $model,
    'latitudeAttribute' => 'lat',
    'longitudeAttribute' => 'long',
    //optional settings
    'editZoom' => 12,
    'pickZoom' => 7,
    'defaultLatitude' => 50.443513052458044,
    'defaultLongitude' => 30.498046875,
));

Changelog

  • September 27 - Replaced "text-indent: -99999999px;" hacks in css, to fix apearance in updated
  • August 9 - Replaced "0+text" expression in script by parseFloat(), added check for NaN value.

Resources

5 0
17 followers
1 131 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Bogdan Savluk
Created on: Jul 8, 2012
Last updated: 10 years ago

Downloads

show all

Related Extensions