Skip to content

Code for web developer who wanna work on HTML5 with OpenLayer3

Notifications You must be signed in to change notification settings

RaviRajpurohit/OpenLayer3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenLayer3

Code for beginners of web developer, Who wanna work on HTML5 with OpenLayer3

This HTML code shows very basic of map. means It show the map on web-browesr.
HTML file contains the two part of code

  1. head
  2. body
    Head contains 3 javascript files and 2 css files, 1 css and 2 javascript files (ol.css, ol-debug.js, jquery-2.1.1.min.js) are basic file to add map with html. other files discribe below

main.css

Cascading Style Sheets, Its give a look to html code. '#' use for Class of html tag and '.' use for Id of html tag.

main.js

Java script, Its main thing to handle the html page. It use some special function to perform any opration on html tag or code.
var stand for variable declairation, here we declaire some globle verible view, mapquest, osm, toner, stamen, map and one local variable layer in change block.
The view variable is responsible to show map on screen with particulre position.
center: ol.proj.fromLonLat([78.9629, 23.3])
It is deaclaire the centre of view. The parameter is an array, the collaction of longitude and laltitude of India.
Zoom by defualt value of view.
map variable contains the control options, canvas view, map variabe and view variable.
The change block is a function to performe selection process of map from list of map(one of the mapquest, osm, toner, stamen) layer variable select the layer of clicked map.
mapquest, osm, toner, stamen these are type of map view. Stalite capture some data from sensor, then it convert into one of these view. every map create by tiles. Tile is a one part of map image.
setVisible function reaturn the bulean value for selected map.

Thanking you
Ravi Rajpurohit

About

Code for web developer who wanna work on HTML5 with OpenLayer3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published