Coder Social home page Coder Social logo

logikfabrik / ujetmaps Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 572 KB

Umbraco Jet Maps (uJetMaps) is a geographical coordinates data type and property editor for Umbraco 7, built using uJet.

License: MIT License

JavaScript 37.73% CSS 1.44% C# 60.23% Batchfile 0.60%
umbraco mvc code-first

ujetmaps's Introduction

uJetMaps Build status

Umbraco Jet Maps (uJetMaps) is a geographical coordinates data type and property editor for Umbraco 7, built using uJet - a Code First approach to building MVC applications in Umbraco 7.

Screenshot

NuGet

PM> Install-Package uJetMaps

How To

uJetMaps is easy to use. Add a reference to uJetMaps. Add a public property of type GeoCoordinates to one of your document or media types (using uJet). Fire up your application and a property editor for setting coordinates will now be available in the Umbraco back office.

Model

namespace Example.Models
{
    using System.ComponentModel.DataAnnotations;
    using Logikfabrik.Umbraco.Jet;
    using Logikfabrik.Umbraco.Jet.Maps;

    [DocumentType(
        "Map page",
        Description = "Document type for map coordinates",
        AllowedAsRoot = true)]
    public class MapPage
    {
        [Display(
            Name = "Map", 
            Description = "The map coordinates")]
        public GeoCoordinates MapCoordinates { get; set; }
    }
}

View

@model Example.Models.MapPage

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <p>lat: @Model.MapCoordinates.Lat</p>
    <p>lng: @Model.MapCoordinates.Lng</p>
</body>
</html>

Controller

namespace Example.Controllers
{
    using System.Web.Mvc;
    using Logikfabrik.Umbraco.Jet.Web.Mvc;
    using Models;

    public class MapPageController : JetController
    {
        public ActionResult Index(MapPage model)
        {
            return View(model);
        }
    }
}

Contributions

uJetMaps is Open Source (MIT), and you’re welcome to contribute!

If you have a bug report, feature request, or suggestion, please open a new issue. To submit a patch, please send a pull request.

ujetmaps's People

Contributors

logikfabrik avatar

Watchers

James Cloos avatar  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.