Code Monkey home page Code Monkey logo

wxwebmap's Introduction

wxWebMap

A C++ library enabling web maps in desktop applications (Windows, Linux, MacOS). A wxWebMap is a wxWindow that can be added to your wxWidgets application to show maps, add map objects and edit map objects.

wxWidgets

The library is based on wxWidgets and the web map is displayed using a wxWebView window.

leafletjs

The map functionality is implemented using leafletjs. Leafletjs javascript snippets to e.g. add a marker to a map are executed by calling e.g. wxWebMap::AddMapObject.

Sample application

In examples/wxWebMapApplication there is a sample application with GUI. It is based on the wxWidgets wxWebView sample and opens a map in the web view. To demonstrate the C++ binding to the map, you can add markers, polygons or images using Menu->Map->Add marker|polygons|images....

wxWebMapApp

Build instructions

Install required packages

  1. Install vcpkg by following these instructions: https://vcpkg.io/en/getting-started.html
  2. Set environment variable CMAKE_TOOLCHAIN_FILE to [path to vcpkg]/scripts/buildsystems/vcpkg.cmake
  3. Install wxWidgets
    Windows: $ .\vcpkg.exe install wxwidgets:x64-windows
    Linux:   $ .\vcpkg.exe install wxwidgets:x64-linux
    
  4. Clone the wxWebMap repository from https://github.com/I-CONIC-Vision-AB/wxWebMap

Build with Visual Studio

Open the wxWebMap folder in Visual Studio. CMake configuration should start automatically. Choose your preset (debug/release) and build.

Build with CMake command

$ cmake -S . --preset=[preset name]
$ cmake --build out/build/[preset name]

Available presets are:

  • linux-x64-debug
  • linux-x64-release
  • windows-x64-debug
  • windows-x64-release

Known issues

If you run into problems when compiling wxWidgets or even if compilation works but you get messages like "wx*.dll not found" when running sample applications. Replace the ./vcpkg/ports/wxwidgets/portfile.cmake with the one in wxWebMap/cmake/portfile.cmake and rebuild wxWidgets (vcpkg install wxwidgets:x64-windows).

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.