OpenLayers: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) |
||
Line 49: | Line 49: | ||
== OpenLayers and React == | == OpenLayers and React == | ||
Three sample projects on Github, all stopped at OpenLayers 3. | |||
This one actually just loads and runs, making me happy. | |||
[https://github.com/pka/ol3-react-example Pirmin Kalberer's OL3-React-Example] | |||
Works right out of the box. | |||
[https://github.com/richardhills/ol-react Richard Hill's ol-react]. Took me 1/2 a day to get it to build but there is no example on how to use it. Bad for me, a React newbie. | |||
[https://github.com/allenhwkim/react-openlayers Allen Kim's react_openlayers] | |||
Revision as of 23:43, 5 November 2018
Search for OpenLayers on this wiki to find other relevant pages. Or look in the category.
What is OpenLayers?
OpenLayers (http://openlayers.org/) is Javascript code you use on your Web server. You reference it from your own HTML and Javascript based pages, to put maps into your web site.
Docs for programmers: http://openlayers.org/en/latest/doc/
OpenLayers is very stable code. Version 5 was recently released. It supports tiled raster and vector layers. It supports editing. It seems to support everything that I want to do.
Books
OpenLayers is so popular that there are even books about it! None for version 5 yet that I know of. I removed all the books I had listed here because they were all more than 2 years old. :-) You can look in the History tab if you really want.
The Marin library has ebooks via Safari but they are for version 3.
I bought OpenLayers 3.x Cookbook and I am going through it. Yes.. OL 4.x is out, but the big break was 2->3, 3->4 is a smaller jump and there aren't books on 4 yet. Or 5.
My test samples
live server
Lately I have been working on https://map46.com Sometimes I have http://maps.wildsong.biz/ up on Bellman.
at github
Currently I am using Node.JS and testing on my desktop. You can see code I have running here: https://github.com/brian32768/map46 and https://github.com/brian32768/OpenlayersTests
For the first week I extensively used Microsoft Visual Studio and Parcel. Since then I have learned enough JavaScript that I've just been using Emacs to edit, Parcel to build, and Chrome to test and debug.
That project has samples with OpenLayers 2, 4, and 5 (3 and 4 are the same basically so only one). Because there were BOOKS on 2 and 3 I started there and built samples, got them running and then stepped up.
There is an example using XYZ so that I could test an ESRI tile server.
Now I am now adding a Bootstrap + OpenLayers sample so that I can make something that looks like a real web site.
OpenLayers + ArcGIS REST
OpenLayers and React
Three sample projects on Github, all stopped at OpenLayers 3.
This one actually just loads and runs, making me happy. Pirmin Kalberer's OL3-React-Example Works right out of the box.
Richard Hill's ol-react. Took me 1/2 a day to get it to build but there is no example on how to use it. Bad for me, a React newbie.