Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12406 closed enhancement (fixed)

[patch][ccla]Add OpenLayers-based Maps widget

Reported by: Chris Mitchell Owned by: Tom Trenka
Priority: high Milestone: 1.7
Component: General Version: 1.6.0rc1
Keywords: 1.7-mobile Cc:
Blocked By: Blocking:


The proposal here is to add a mapping component based on the OpenLayers? library. OpenLayers? is a free, Open Source JavaScript? library for displaying map data in web browsers. See more details about OpenLayers? at The Dojo OpenLayers? Maps component will be take full advantage of the OpenLayers? library to display maps provided by major mapping service providers such as Open Street Maps, Google Maps, Yahoo Maps, ESRI Arc GIS and Virtual Earth / BING maps. The proposal also includes some enhancement to be able to draw georeferenced GFX shapes and to be able to place georeferenced Dojo widget on a map.

See full proposal details at:

Attachments (2) (128.4 KB) - added by Marc Durocher 11 years ago. (128.4 KB) - added by Marc Durocher 11 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 11 years ago by Chris Mitchell

Owner: changed from anonymous to Tom Trenka

comment:2 Changed 11 years ago by Chris Mitchell

Type: defectenhancement

comment:3 Changed 11 years ago by Tom Trenka

One comment so far (based on the proposal): use the dojox.geo namespace for this (as opposed to dojox.maps). That was placed there with the intention that eventually real map components would live there, but I haven't had the time to try to start up any components.

One other comment: please try to write this the same basic way we did charting, where there is a base library for all the actual map work, and then widgets built on top of that (as opposed to writing widgets directly).

comment:4 Changed 11 years ago by Tom Trenka

Status: newassigned

comment:5 Changed 11 years ago by Marc Durocher

So I propose dojox.geo.maps for the base library package and dojox.geo.maps.widget for the widget package. The class of the widget will then be dojox.geo.maps.widget.Maps Is that OK ?

comment:6 Changed 11 years ago by vvoovv

I suggest to point explicitly in the package name that is about OpenLayers?. What about dojox.geo.fw.ol where fw stands for framework? One could imagine,, dojox.geo.fw.mapstraction etc

As an OpenLayers? developer I'd prefer to augment OL API but not entirely substitute it for dojo's

I would prefer to have: 1) a dojo widget that wraps OpenLayers?.Map. After an instantion a developer can get a handle to the OpenLayers?.Map and work with familiar OpenLayers? API 2) dojox.gfx layer that can be added via map.addLayer(gfxLayer), where map is an instance of OpenLayers?.Map 3) dojo widgets that can be used instead of OL's ones: zooming slider, popup, list of layers, etc

comment:7 Changed 11 years ago by Tom Trenka

The point of having dojox.geo was to deal with map-based APIs. The only reason why there is a charting namespace underneath it is because I was anticipating that the initial patches submitted would not apply to a generic mapping/GIS solution. Marc, do you see a reason why the work you're doing would need to be isolated similarly? If not, then I'd say don't do dojox.geo.maps; just assume that you are the basic owner of the project, and the current charting solutions are not dependent on what you are doing.

vvoovv: I think you are assuming that most of the users of the project would default to having that level of control. I would suggest that unless you live in a GIS world, that's not the case...the main thing to consider here is the ease with which a typical non-GIS developer can incorporate any of the work here. That points at Marc's use of a variable to choose which mapping service to use, as opposed to forcing your typical developer to know and understand the limitations of the service being used.

The goal should always be ease-of-use for developers not familiar with the ins-and-outs of the various services.

comment:8 Changed 11 years ago by vvoovv


what is the place of the framework (inspired by dojox.geo.charting) I propose to develop (see my mail today with demos)? I'll try to prepare the written proposal next Monday.

In my opinion that could be dojo's own geo-framework. For the moment all my demos are about map charting. But it's only a matter of time to prepare a demo with vector streets and buildings. I expected that the key class in my framework would be dojox.geo.Map

comment:9 Changed 11 years ago by Marc Durocher

I think that vvoovv's proposal makes sense concerning pointing explicitly OpenLayers?, but I would says that dojox.geo.openlayers is enough. Separating frameworks leaves room for any other framework like vvoovv's one and adds the possibility of future extensions (I think of a possible ESRI extension for example).

vvoovv : The dojo widget I propose does not replace OpenLayers? but is a wrapper for OpenLayers?.Maps adding short cuts for non-GIS developer. The handle on the OpenLayers? map is of course available for more advanced users.

I will then refactor (again) my code and make a patch proposal using a dojox.geo.openlayers package. I will try to separate a base library and a widget for consistency purpose with other components.

comment:10 Changed 11 years ago by Chris Mitchell

Milestone: tbd1.7

comment:11 Changed 11 years ago by vvoovv


I would like to propose to go in sync and create a unified dojox.geo framework

Last days I've been thinking about providing an easy way to write some geo-code and specify where to display the related geo-content: dojox.gfx-based framework or in Google Earth Javascript API ( or WebGL canvas (when it becomes mature enough).

Thank to this this thread I can propose the following high level solution that can harmonize my and Marc's work.

We specify a dojox.geo API and develop its different realizations:

  • I'll contribute to dojox.gfx-based realization (Marc and Erwan seem to be interested in doing some contribution here as well)
  • Marc seems to be interested in OpenLayers?' realization and later in ESRI's one
  • I am interested in doing some prove of the concept for Google Earth Javascript API
  • WebGL (as far as geo-applications are concerned). Well, let's wait till it's there.

It's the same approach as for dojox.gfx: an application developer write the same code for canvas, silverlight, VML and SVG

So Marc, is it ok for you? Can we discuss dojox.geo common API?

comment:12 Changed 11 years ago by Marc Durocher

Vladimir : Sure, why not ? I am only lacking of free time :). What we already have is a geocharting component, using a GFX Surface to draw the map and my proposal, based on OpenLayers?, also includes a GFX layer to draw geolocalized shapes. So a proposal for a Google Earth Dojo extension seems interesting. I must admit that I don't know much about WebGL.

comment:13 Changed 11 years ago by vvoovv

Marc, ok You probably forgot to mention my refactoring of original dojox.geo.charting that live now under course.geo namespace. It includes: 1) initial support of tree-like map structure 2) support of GeoJson? format for map features definition (polygon with holes are supported as well) 3) Attachment/detachment of events to a vector feature, feature containers and the whole map 4) dojox.charting-like actions (Highlight and Magnify)

From GIS point of view that's just normal map, so "charting" folder is not neccessary. I got rid of it in course.geo

WebGL is about hardware accelerated 3D graphics via javascript. I updated yesterday Google Chrome to the 10th release version. And WebGL is there! WebGL should be part of Firefox 4. It would be great if we had dojox.gfx.3d that provide high level interface for WebGL :)

comment:14 Changed 11 years ago by Chris Mitchell

Summary: Add OpenLayers-based Maps widget[patch][ccla]Add OpenLayers-based Maps widget

comment:15 Changed 11 years ago by Tom Trenka


Grabbed your patch; there's a lot here, so it's going to take a little time to plow through it all. I'll get back to you once I've had a chance to look it over in depth. Nice thing is that the tests seem to work without any issues =)

Changed 11 years ago by Marc Durocher

Attachment: added

Changed 11 years ago by Marc Durocher

Attachment: added

comment:16 Changed 11 years ago by Marc Durocher

updated patch for a few bug fix.

comment:17 Changed 11 years ago by Chris Mitchell

Resolution: fixed
Status: assignedclosed

(In [24611]) fixes #12406 Experimental OpenLayers? map library initial checkin !strict

comment:18 Changed 11 years ago by Chris Mitchell

(In [24612]) refs #12406 updated README for openlayers

Note: See TracTickets for help on using tickets.