Making maps with Leaflet.js Steve Signell, Instructor Robert Poirier, TA School of Science Rensselaer Polytechnic Institute.

Slides:



Advertisements
Similar presentations
Web Center Certification Sitemap / Formatting Content Web Center Certification Training Intuit Financial Services University.
Advertisements

PART IV - EMBED VIDEO, AUDIO, AND DOCUMENTS. Find a video on Youtube.com: Search for a video, then look for the Embed code. Copy this code into the HTML/JavaScript.
Drupal Basics Part 2 Everyday Tasks Editing a page Toolbar basics Add a hyperlink Using the theme Agricultural Communications Services Integrated Media.
1 Web Site Design Overview of the Internet Cookie Setton.
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
Chapter 4 Adding Images. Inserting and Aligning Images Graphics refer to the appearance of most non- text items on a web page, such as: – Photographs.
Services Course Windows Live SkyDrive Participant Guide.
Gdes2000 Graphic Design for Internet & Multimedia An Introduction to Dreamweaver CS5 + Adding Text Overview of palettes and DW working environment. Creation.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Services Course Windows Live SkyDrive Participant Guide.
Enhance your reports with template and script columns
Connect Pictometry Online End User
HTML Concepts and Techniques Fourth Edition Project 2 Creating and Editing a Web Page.
CSW131 Steven Battilana 1 CSW 131 Free MS Software (MSDNAA) MS Visual Web Developer W3 / Mozilla Code Validators Uploading Your Website Summer 2013 Prepared.
Creating and Editing a Web Page Using Inline Styles
Making maps with Leaflet.js Part II
Day 2 – JavaScript & PHP.  Have the hover effect display an extra image  Add an extra image for each of the tags  In your writeText() function, you.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
This presentation can be downloaded at Presented by the Office of Public Affairs Using the Cal State L.A. Web.
Overview of HTML. Three Different Approaches  Text editor like Notepad  HTML editor such as: –KompoZer –DreamWeaver –Microsoft Expression Web –iWeb.
Adding an image to a page in Dreamweaver Uploading files to x10hosting Editing uploaded files in x10hosting Adding links in Dreamweaver Uploading linked.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Create a Website Session I Key Components Hands-on HTML.
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
Using Dreamweaver. Slide 1 Dreamweaver has 2 screens that do different things The Document window where you create your WebPages The Site window where.
Making an HTML Document Notepad Group Bo Kim Dan Carter Han Chong Justin Weaver Kris Lamont.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Using FrontPage Express. Slide 1 Standard toolbars and menus Time indicator: gives an approximation of download time of the page.
JAOIT 8.  Dreamweaver is a program for creating web pages and managing websites without having to type HTML code.  WYSIWYG – What you see is what you.
Tutorial: Using ArcGIS Server and ESRI ArcGIS API for Javascript Peter Sforza March 7, 2013.
University of Sunderland CDM105 Session 6 Dreamweaver and Multimedia Fireworks MX 2004 Creating Menus and Button images.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
Mrs. Knopp Library Media Specialist.  The term wiki comes from the phrase Wiki- Wiki which is the Hawaiian word for quick.  A wiki is a website that.
MapInfo Professional 11.0: getting started Xiaogang (Marshall) Ma School of Science Rensselaer Polytechnic Institute Friday, January 25, 2013 GIS in the.
Web Foundations WEDNESDAY, NOVEMBER 20, 2013 LECTURE 32: DREAMWEAVER SLIDE SHOW AND GOOGLE MAP.
Images Worksheet. Web template Download the template folder Unzip and save in your documents Rename the folder to “images work” without quotes.
WAMP Windows Apache MySQL and PHP i.e. “WAMP”. Why WAMP? WampServer is a Windows web development environment. It allows you to create and test web pages.
Troubleshooting: Web maps & Joins Steve Signell, Instructor Robert Poirier, TA School of Science Rensselaer Polytechnic.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Photoshop Image Slicing. Reasons to Image Slide To create links out of sliced images To optimise different areas. (flat areas of colour, such as logos,
Literate Programming and the Process of GIS Steve Signell, Instructor Robert Poirier, TA School of Science Rensselaer.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Creating and Editing a Web Page Using Inline Styles
Creating Web Pages with Links, Images, and Embedded Style Sheets
Sitecore Basic Training Drexel’s full-featured web content management system (CMS) Web Support Information Resources & Technology (IRT)
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
 A Javascript library designed to simplify client-side scripting of HTML.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Weebly Elements, Continued
ADVANCED: Making maps with Leaflet.js
ADVANCED: Troubleshooting: Web maps & Joins
Adapting Files On A “Visual Webpage” (Ver /mb)
JavaScript “Hello World” in Microsoft Visual Studio 2013
Tutorial: How to Creat a Website.
DW Tutorial 5 Sessions 5.1 & 5.2 REVIEW
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
ADVANCED: Making maps with Leaflet.js Part II
Basic HTML and Embed Codes
Introduction to Google Maps
Embedding Graphics in Web Pages
Intro to Web Development Links
Intro to Web Development First Web Page
Web Page Design CIS 300.
Client-Server Model: Requesting a Web Page
Introduction to JavaScript
Presentation transcript:

Making maps with Leaflet.js Steve Signell, Instructor Robert Poirier, TA School of Science Rensselaer Polytechnic Institute Monday, March 31, 2014 GIS in the Sciences ERTH 4750 (38031)

Leaflet.js Leaflet.js: An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps: Javascript is embedded in an.html file What is an.html file?

Before we start, we must: Download & Install the Sublime Text 3 text editor: Next we will create a webserver on your machine: What is a webserver? A folder on your machine that can be viewed accessed via a web browser.

PgAdmin/Postgres Installed? Open Application Stack Builder and select Web Development  Apache/PHP. Direct your browser to ‘localhost:800’– does it show a message from Apache? If not, ask for help and we’ll find it. The folder containing your web server MAY be something like ‘Program Files\ApachePHP\apache\www’ If not, ask for help and we’ll find it. Copy the ‘giscience_leaflet_template’ folder into your webserver folder. Now open up your browser again and paste ‘/ giscience_leaflet_template ‘ onto the end of the URL: You should see something like this:

OpenGeo Suite installed? Open up your OpenGeo Suite Dashboard and note the URL. It will probably be something like ‘localhost:8080’ On windows, the folder containing your web server MAY be something like ‘Program Files\Boundless\OpenGeo\jetty\webapps.’ If not, ask for help and we’ll find it. Copy the ‘giscience_leaflet_template’ folder into your webserver folder. Now open up the OpenGeo Dashboard again and paste ‘/ giscience_leaflet_template ‘ onto the end of the URL: You should see something like this:

Explore your folder Open the helloworld.html file, and then right-click  View Page Source Do the same with leaflet_template.html Open the data and img folders and explore their contents. how are GeoJSON files structured? (‘JSONView’ is a nice little Chrome/Firefox extension that helps you decipher GeoJson files.)

Parts of a Leaflet Map Script files Map area Zoom tool layerControl data

Edit your html Open your helloworld.html in Sublime Text 3, and modify the text between the ‘title’ and ‘body’ tags. Make sure you save it, and then reload the webpage in your browser. Did anything change? Open leaflet_template.html in Sublime Text, and make the following changes. After each step, save the file and then check the effect by refreshing the page in your browser. Change the title (line 5) Make the map a square shape (line 16) Change the initial zoom from 9 to 8 (line 26) Change the color of the borough boundaries from black to red (line 47) Change the default basemap from OpenStreetMap to NAIP (line 63) Change the name of the boroughs in the layerControl from ‘Boroughs’ to ‘NYC Boroughs’ (line 73)

Add another overlay layer Add another overlay layer by adding the following text to leaflet_template.html, after the boroughs data gets loaded (line 60): //make a variable for the museums layer and set the style var museums = L.geoJson(null, { pointToLayer: function (feature, latlng) { return L.marker(latlng, { icon: L.icon({ iconUrl: "img/museum.png", iconSize: [24, 28], iconAnchor: [12, 28], popupAnchor: [0, -25] }), title: feature.properties.NAME, riseOnHover: true }); } }); //load the museums data from geojson $.getJSON("data/museums.geojson", function (data) { museums.addData(data); }); Also add the ‘museums’ layer to the overlays in your layerControl.

Add your own layer 1)Use QGIS to save the nyc_subway_stations layer as a GeoJSON file in your /data folder. Make sure you reproject the data from UTM18N to WGS84 (EPGS:4326). 2)Add the subways stations layer to the map by copying and modifying the code from the previous slide. 3)Don’t forget to your new layer to the layerControl. Optionally, you can also load it onto the map by default. 4)Find a more appropriate.jpg or.png image for subway stops and save it to your /img folder. Then change the ‘iconURL’ so it points to this new image. 5)If you want some text to appear when you hover over the feature, you’ll have to change the ‘title: feature.properties.NAME’ to point to a field name that exists in your geojson (this is case sensitive).

Homework 11 Experiment with adding more layers and with the tutorials at leaflet.js.com. Create a new.html file that creates a leaflet map of the RPI area and include one or more layers from your group project.