We recently had the opportunity to present at FOSS4G 2011, the premiere international conference for open source geospatial software that was held in Denver this year (right across the street). There were over 900 attendees and it was an excellent conference.
Our presentation focused on the idea of using open source software with closed source software and the presentation highlights the success we have had in using this hybrid approach.
After we gave our presentation, I was approached by an audience member that was the original author of the AgsJSAdapter that we talked about in our presentation.
We have made several changes to the adapter to remove the dependency on the ESRI ArcGIS Server JavaScript API and we’ll try to get the changes posted back for others to use.
GIS in the Rockies 2011
I have also uploaded a previous presentation that we gave at GIS in the Rockies 2011 that goes more into the mechanics of building maps as distributed JavaScript widgets.
I gave a lightning talk at the ESRI Denver Dev Meetup yesterday evening on building distributed JavaScript map widgets.
The presentation provided an overview of some techniques, technical considerations, and benefits of using JavaScript widgets (as opposed to iframe widgets).
This was my first attempt at a lighting talk.. seven minutes sure go by fast!
Here are the slides:
Just came across a nice jsFiddle example showing how to display map tiles from Google Fusion Tables in OpenLayers.
Full example at: http://jsfiddle.net/UAxun/155/
We have integrated Google Closure Compiler into our OpenLayers build scripts and we are getting 22% more compression over jsmin when using the Closure Compiler SIMPLE_OPTIMIZATIONS compilation level.
OpenLayers is not written to support the ADVANCED_OPTIMIZATIONS level but works great with SIMPLE_OPTIMIZATIONS.
We are calling the Closure Compiler Service API from a Python script and we are running OpenLayers through jsmin first to reduce the request size before sending the request up to Google.
Note that the service API only supports requests up to 1000KB so you will need to customize your OpenLayers build to remove the parts you don’t use first. In our case we were able to reduce the before-minified size by almost 60%.
Here is the python module we are calling from the main OpenLayers build script:
#!/usr/bin/python
import httplib, urllib, sys
from StringIO import StringIO
def compile(input):
# Define the parameters for the POST request and encode them in
# a URL-safe format.
params = urllib.urlencode([
('js_code', input),
('compilation_level', 'SIMPLE_OPTIMIZATIONS'),
('output_format', 'text'),
('output_info', 'compiled_code'),
])
# Always use the following value for the Content-type header.
headers = { "Content-type": "application/x-www-form-urlencoded" }
conn = httplib.HTTPConnection('closure-compiler.appspot.com')
conn.request('POST', '/compile', params, headers)
response = conn.getresponse()
data = response.read()
conn.close
return data