mapping A Mapping Widget for placing openlayers maps, and doing spatial queries. the goal is to make it better than GeoExt

  1. Requirements
  2. Usage
  3. Resources

Comming soon in June, 2013

The goal is to have a set of mapping widgets that can be placed in different parts of a view to make different mapping applications easily using OpenLayers. other programming frameworks like Drupal have several mapping modules.

Proposed widgets:

-map -layer switcher -feature selector [data table grid] -query executor [an input field for query and sending results to openlayers via Ajax] -legend -Editor Panel -controllers [zoomer,panner,.....] -layout [ using JQuery UI Layout] -Data Exporter [exporting result sets to common GIS file formats like KML, GML, Excel e.t.c]


-Yii 1.1 or above -PostgreSQL Database if using the Spatial Query Component


View file

// create layers:
$layerOSM =new OpenLayersLayer( "OSM", "OSM", array(
		"open streets",
		"params" => array(
				'transitionEffect' => 'resize',

) );

// create Map and set options:

$map = new OpenLayersMap();
$map->setOptions( array(
		'controls' => array(
				'js:new OpenLayers.Control.Navigation()',
				'js:new OpenLayers.Control.PanZoomBar()',
				'js:new OpenLayers.Control.LayerSwitcher({div: document.getElementById("layerswitcher")})',
				'js:new OpenLayers.Control.Attribution()',
				'js:new OpenLayers.Control.MousePosition()',
				'js:new OpenLayers.Control.PanZoomBar()',
				'js:new OpenLayers.Control.OverviewMap()',
				'js:new OpenLayers.Control.KeyboardDefaults()',
				//'js:new OpenLayers.Control.EditingToolbar("vms")',

		  'minExtent' => 'js:new OpenLayers.Bounds(-1, -1, 1, 1)',
		  'maxExtent' => 'js:new OpenLayers.Bounds(-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892)',
		  'numZoomLevels' => '18',
		  'maxResolution' => 156543.0339,
		  'units' => "m",
		  'projection' => "EPSG:900913",
		  'displayProjection' => 'js:new OpenLayers.Projection("EPSG:4326")',
	  	  'zoom' =>'2',
		  'center' => 'js:new OpenLayers.LonLat(0, 0)'
) );

$this->Widget( 'ext.mapping.MappingWidget', array(
      'grid_container_id' => 'grid-containerx',
      'map_container_id' => 'map',
      'layer_switcher_id' => 'layerswitcherx',
      'layers' => array( $layerOSM,$layerVector,$layerGOOGLE),
      'map' => $map,
      'htmlOptions' => array(
                             'style' => 'min-height:400px; min-width:200px; display: width:200px; height:100%; border:1px solid;',


Demo comming soon on

2 0
Yii Version: Unknown
License: BSD-2-Clause
Category: Others
Developed by: Islam500
Created on: May 19, 2013
Last updated: 7 years ago

Related Extensions