Git Product home page Git Product logo

djeo's Introduction

djeo

Demos

See Demos wiki page

Installation

For advanced development

If you are an experienced Dojo Toolkit developer or you would like to make a custom djeo build, read the article.

Learning djeo

The "Hello World!" application is more or less self explaining. It can be found in the built version of djeo (see above). The code of the application is also presented below.

A tutorial (under development) is located here. Examples from the tutorial can be found in the built version under djeo-tutorial directory or in the djeo-tutorial repo.

Code Sample

Place a file with the code sample in a directory next to dojo, dijit, djeo directories

<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<link rel="stylesheet" href="../dijit/themes/claro/claro.css"/>

<!--
Supported mapping engines (replace the value for djeoEngine parameter)
Leaflet - djeoEngine:'leaflet'
Google Maps API - djeoEngine:'gmaps'
Google Earth API - djeoEngine:'ge'
ArcGIS API for JavaScript - djeoEngine: 'esri'
Yandex Maps API - djeoEngine:'ymaps'
native djeo engine - djeoEngine:'djeo'
-->
<script src="../dojo/dojo.js" data-dojo-config="
	djeoEngine: 'leaflet'
"></script>

<script>
var features = [
	{
		name: "Bermuda triangle",
		type: "Polygon",
		coords: [ [ [-64.89,32.24], [-80.15,25.7], [-66.07,18.46], [-64.89,32.24] ] ],
		style: {
			fill: "lime",
			fillOpacity: 0.6,
			stroke: "green",
			strokeWidth: 3
		}
	},
	{
		name: "Paris-London railway",
		type: "LineString",
		coords: [ [2.36,48.88], [3.08,50.64], [1.81,50.90], [0.87,51.14], [-0.13,51.53] ],
		style: {
			stroke: "red",
			strokeWidth: 2
		}
	},
	{
		name: "Hello world!",
		type: "Point",
		coords: [-30, 30],
		style: {
			size: [49, 60],
			img: "http://djeo.github.com/ship.png"
		}
	}
];

require([
	"djeo/Map",
	"djeo/control/Navigation",
	"djeo/control/Highlight",
	"djeo/control/Tooltip",
	"dojo/domReady!"
],
function(Map, Navigation, Highlight, Tooltip){
	var map = new Map("map", {
		features: features,
		layers: "roadmap",
		//layers: "webtiles:http://[a,b,c].tile.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/1/256"
	});
	map.ready(function(){
		new Navigation(map);
		new Highlight(map);
		new Tooltip(map);
	});
});
</script>

</head>

<body class="claro">

<div id="map" style="width:800px;height:400px;"></div>

</body>
</html>

License

The "New" BSD License or The Academic Free License, v. 2.1.

All contributors are required to sign a Contributors License Agreement (CLA). See http://dojotoolkit.org/license for the details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.