GithubHelp home page GithubHelp logo

guerillamos / osm-haxe Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

An example of using OpenStreetMap and Haxe to generate a simple html based map of the world for local projects

License: MIT License

HTML 23.31% Haxe 76.69%

osm-haxe's Introduction

Haxe + OpenStreetMap Example

This project demonstrates how to use Haxe to create an interactive map using the OpenStreetMap and Leaflet library.

Project Structure

  • src/ - Haxe source code folder
    • Main.hx - Main Haxe file
    • Leaflet.hx - Leaflet extern definitions
  • index.html - HTML file to display the interactive map
  • build.hxml - Haxe build configuration file

Setup

  1. Install Haxe (https://haxe.org/download/)
  2. Pull this repo down and cd into the folder
  3. Run haxe build.hxml in the terminal/command prompt to compile the project
  4. Open index.html in a web browser to view the interactive map

How It Works

This example uses Haxe to create a simple web application that displays an interactive OpenStreetMap using the Leaflet library. The Leaflet.hx file contains extern definitions for Leaflet's API, allowing you to use the library in Haxe code. The Main.hx file initializes the map and adds a tile layer to display the map data.

When you compile the project with haxe build.hxml, it generates a JavaScript file (main.js) that can be included in the index.html file. The index.html file loads the Leaflet library and its stylesheet from a CDN, sets up the container for the map, and includes the generated main.js file to display the interactive map in the browser.

osm-haxe's People

Contributors

guerillamos avatar

Stargazers

 avatar

Watchers

 avatar

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.