Skip to content

Commit

Permalink
Merge pull request #831 from geoadmin/fix_marker
Browse files Browse the repository at this point in the history
Update OL3 and fix copy marker.png in static directory
  • Loading branch information
oterral committed Jul 2, 2014
2 parents 4707817 + e310e49 commit 52567b0
Show file tree
Hide file tree
Showing 5 changed files with 784 additions and 776 deletions.
4 changes: 3 additions & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ cmds =
if ! [ -d chsdi/static/js/ol3 ];
then
cd ${buildout:directory}/chsdi/static/js/ && git clone https://github.com/geoadmin/ol3.git
cd ol3 && API_URL=${vars:api_url} ${buildout:bin-directory}/python build-ga.py
cd ol3 && npm install && API_URL=${vars:api_url} ${buildout:bin-directory}/python build-ga.py
cd ${buildout:directory}
fi

Expand Down Expand Up @@ -261,9 +261,11 @@ cmds =
rm -f ${buildout:directory}/chsdi/static/js/ol3/build/ga.css &&
rm -f ${buildout:directory}/chsdi/static/js/ol3/build/ol.css &&
rm -f ${buildout:directory}/chsdi/static/js/ol3/build/ga*.js &&
rm -f ${buildout:directory}/chsdi/static/js/ol3/build/marker.png &&
API_URL=${vars:api_url} ${buildout:bin-directory}/python build-ga.py &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/ga.css ${buildout:directory}/chsdi/static/css/ &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/ol.css ${buildout:directory}/chsdi/static/css/ &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/marker.png ${buildout:directory}/chsdi/static/css/ &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/ga*.js ${buildout:directory}/chsdi/static/js/ &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/EPSG* ${buildout:directory}/chsdi/static/js/ &&
cp ${buildout:directory}/chsdi/static/js/ol3/build/proj4js-com* ${buildout:directory}/chsdi/static/js
Expand Down
2 changes: 1 addition & 1 deletion chsdi/static/css/ga.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added chsdi/static/css/marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions chsdi/static/js/ga-whitespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -33317,7 +33317,7 @@ ga.Tooltip.prototype.handleIdentifyResponse_ = function(response) {
this.source_.addFeatures(this.createFeatures_(response))
}
for(var i = 0, ii = response["results"].length;i < ii;i++) {
var lang = window.GeoAdmin && window.GeoAdmin.lang ? window.GeoAdmin.lang : "de";
var lang = window["GeoAdmin"] && window["GeoAdmin"]["lang"] ? window["GeoAdmin"]["lang"] : "de";
var jsonp = new goog.net.Jsonp(new goog.Uri(window["GeoAdmin"]["serviceUrl"] + "/rest/services/api/MapServer/" + response["results"][i]["layerBodId"] + "/" + response["results"][i]["featureId"] + "/" + "htmlPopup?lang\x3d" + lang), "callback");
jsonp.send({}, goog.bind(this.handleHtmlpopupResponse_, this), goog.bind(this.handleHtmlpopupError_, this))
}
Expand Down Expand Up @@ -34448,7 +34448,7 @@ ga.source.wmts = function(layer, options) {
var tileGrid = new ol.tilegrid.WMTS({origin:[42E4, 35E4], resolutions:resolutions, matrixIds:goog.array.range(resolutions.length)});
var extension = options.format || "png";
var timestamp = options["timestamps"][0];
return new ol.source.WMTS(({crossOrigin:"anonymous", attributions:[ga.layer.getAttribution('\x3ca href\x3d"' + options["attributionUrl"] + '" target\x3d"new"\x3e' + options["attribution"] + "\x3c/a\x3e")], url:("http://wmts{0-4}.geo.admin.ch/1.0.0/{Layer}/default/" + timestamp + "/21781/" + "{TileMatrix}/{TileRow}/{TileCol}.").replace("http:", location.protocol) + extension, tileGrid:tileGrid, layer:options["serverLayerName"] ? options["serverLayerName"] : layer, requestEncoding:"REST"}))
return new ol.source.WMTS(({crossOrigin:"anonymous", attributions:[ga.layer.getAttribution('\x3ca href\x3d"' + options["attributionUrl"] + '" target\x3d"new"\x3e' + options["attribution"] + "\x3c/a\x3e")], url:("http://wmts{5-9}.geo.admin.ch/1.0.0/{Layer}/default/" + timestamp + "/21781/" + "{TileMatrix}/{TileRow}/{TileCol}.").replace("http:", location.protocol) + extension, tileGrid:tileGrid, layer:options["serverLayerName"] ? options["serverLayerName"] : layer, requestEncoding:"REST"}))
};
ga.source.wms = function(layer, options) {
return new ol.source.TileWMS({crossOrigin:"anonymous", attributions:[ga.layer.getAttribution('\x3ca href\x3d"' + options["attributionUrl"] + '" target\x3d"new"\x3e' + options["attribution"] + "\x3c/a\x3e")], params:{"LAYERS":options["wmsLayers"] || layer}, url:options["wmsUrl"].split("?")[0].replace("http:", location.protocol)})
Expand Down Expand Up @@ -41170,7 +41170,6 @@ goog.exportProperty(ga.Map.prototype, "bindTo", ga.Map.prototype.bindTo);
goog.exportProperty(ga.Map.prototype, "dispatchChangeEvent", ga.Map.prototype.dispatchChangeEvent);
goog.exportProperty(ga.Map.prototype, "forEachFeatureAtPixel", ga.Map.prototype.forEachFeatureAtPixel);
goog.exportProperty(ga.Map.prototype, "geocode", ga.Map.prototype.geocode);
goog.exportProperty(ga.Map.prototype, "geocode", ga.Map.prototype.geocode);
goog.exportProperty(ga.Map.prototype, "get", ga.Map.prototype.get);
goog.exportProperty(ga.Map.prototype, "getControls", ga.Map.prototype.getControls);
goog.exportProperty(ga.Map.prototype, "getCoordinateFromPixel", ga.Map.prototype.getCoordinateFromPixel);
Expand All @@ -41189,12 +41188,10 @@ goog.exportProperty(ga.Map.prototype, "getTarget", ga.Map.prototype.getTarget);
goog.exportProperty(ga.Map.prototype, "getView", ga.Map.prototype.getView);
goog.exportProperty(ga.Map.prototype, "getViewport", ga.Map.prototype.getViewport);
goog.exportProperty(ga.Map.prototype, "highlightFeature", ga.Map.prototype.highlightFeature);
goog.exportProperty(ga.Map.prototype, "highlightFeature", ga.Map.prototype.highlightFeature);
goog.exportProperty(ga.Map.prototype, "notify", ga.Map.prototype.notify);
goog.exportProperty(ga.Map.prototype, "on", ga.Map.prototype.on);
goog.exportProperty(ga.Map.prototype, "once", ga.Map.prototype.once);
goog.exportProperty(ga.Map.prototype, "recenterFeature", ga.Map.prototype.recenterFeature);
goog.exportProperty(ga.Map.prototype, "recenterFeature", ga.Map.prototype.recenterFeature);
goog.exportProperty(ga.Map.prototype, "removeControl", ga.Map.prototype.removeControl);
goog.exportProperty(ga.Map.prototype, "removeInteraction", ga.Map.prototype.removeInteraction);
goog.exportProperty(ga.Map.prototype, "removeLayer", ga.Map.prototype.removeLayer);
Expand Down Expand Up @@ -41338,6 +41335,7 @@ goog.exportProperty(ol.Geolocation.prototype, "unByKey", ol.Geolocation.prototyp
goog.exportProperty(ol.Geolocation.prototype, "unbind", ol.Geolocation.prototype.unbind);
goog.exportProperty(ol.Geolocation.prototype, "unbindAll", ol.Geolocation.prototype.unbindAll);
goog.exportProperty(ol.ImageTile.prototype, "getImage", ol.ImageTile.prototype.getImage);
goog.exportProperty(ol.ImageTile.prototype, "getTileCoord", ol.ImageTile.prototype.getTileCoord);
goog.exportSymbol("ol.Kinetic", ol.Kinetic);
goog.exportSymbol("ol.Map", ol.Map);
goog.exportProperty(ol.Map.prototype, "addControl", ol.Map.prototype.addControl);
Expand Down Expand Up @@ -42702,6 +42700,14 @@ goog.exportProperty(ol.source.Tile.prototype, "once", ol.source.Tile.prototype.o
goog.exportProperty(ol.source.Tile.prototype, "un", ol.source.Tile.prototype.un);
goog.exportProperty(ol.source.Tile.prototype, "unByKey", ol.source.Tile.prototype.unByKey);
goog.exportSymbol("ol.source.TileDebug", ol.source.TileDebug);
goog.exportProperty(ol.source.TileDebug.prototype, "dispatchChangeEvent", ol.source.TileDebug.prototype.dispatchChangeEvent);
goog.exportProperty(ol.source.TileDebug.prototype, "getRevision", ol.source.TileDebug.prototype.getRevision);
goog.exportProperty(ol.source.TileDebug.prototype, "getState", ol.source.TileDebug.prototype.getState);
goog.exportProperty(ol.source.TileDebug.prototype, "getTileGrid", ol.source.TileDebug.prototype.getTileGrid);
goog.exportProperty(ol.source.TileDebug.prototype, "on", ol.source.TileDebug.prototype.on);
goog.exportProperty(ol.source.TileDebug.prototype, "once", ol.source.TileDebug.prototype.once);
goog.exportProperty(ol.source.TileDebug.prototype, "un", ol.source.TileDebug.prototype.un);
goog.exportProperty(ol.source.TileDebug.prototype, "unByKey", ol.source.TileDebug.prototype.unByKey);
goog.exportSymbol("ol.source.TileImage", ol.source.TileImage);
goog.exportProperty(ol.source.TileImage.prototype, "dispatchChangeEvent", ol.source.TileImage.prototype.dispatchChangeEvent);
goog.exportProperty(ol.source.TileImage.prototype, "getRevision", ol.source.TileImage.prototype.getRevision);
Expand Down
Loading

0 comments on commit 52567b0

Please sign in to comment.