This guide will help set up your django project to use ReactJS
- django-webpack-loader==0.4.1 ( Connects Django project with Webpack)
// Since overlays are VectorGrid layers with canvas rendering, | |
// they don't support clicking through them (the topmost canvas | |
// swallows the event, lower layers will not see it). | |
// We workaround this by this hack (inspired by | |
// http://www.vinylfox.com/forwarding-mouse-events-through-layers/): | |
// | |
// All overlays are in their own Leaflet pane. When a click hits a | |
// layer in the pane, we first handle the event like normal, and then | |
// hit the event handler below this comment. | |
// |
Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.view { | |
fill: blue; | |
stroke: #000; | |
} | |
</style> |
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu |
/* | |
UPDATE July 2016 , moved and updated to here: https://github.com/Sumbera/gLayers.Leaflet | |
Generic Canvas Overlay for leaflet, | |
Stanislav Sumbera, April , 2014 | |
- added userDrawFunc that is called when Canvas need to be redrawn | |
- added few useful params fro userDrawFunc callback | |
- fixed resize map bug | |
inspired & portions taken from : https://github.com/Leaflet/Leaflet.heat |
function getTileUrls(bounds, tileLayer, zoom) { | |
var min = map.project(bounds.getNorthWest(), zoom).divideBy(256).floor(), | |
max = map.project(bounds.getSouthEast(), zoom).divideBy(256).floor(), | |
urls = []; | |
for (var i = min.x; i <= max.x; i++) { | |
for (var j = min.y; j <= max.y; j++) { | |
var coords = new L.Point(i, j); | |
coords.z = zoom; |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:
info_format
parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.