Skip to content

landsurveyorsunited/MVC-GoogleMaps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC-GoogleMaps

HtmlHelper for using JQuery.GoogleMaps plugin on ASP.NET MVC pages

###What can I do with it This is HtmlHelper for rendering out GoogleMaps either for editiong or viewing using JQuery.GoogleMaps plugin.

The library provides:

  • HtmlHelper for rendering out GoogleMap editor of viewer
  • Model POCO classes
  • Extension methods for serializing and deserializing map model

ScreenShot

###How to add to a page HtmlHelper for GoogleMap can be easily added as any other HtmlHelper in ASP.NET MVC.

@Html.GoogleMapEditor("HiddenTreasureMap", new Mvc.GoogleMaps.Models.Map() { editMode=true})

However, you will have to add reference to a javascript, jquery and css files manualy in your page. You can referenci them from CDN or from local file system.

<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.googlemaps/2.2.4/css/mapstyle.min.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.googlemaps/2.2.4/jquery.googlemaps.min.js"></script>

This library is available as a NuGet package as well, so you van add it to your project through NuGet package manager or console.

ScreenShot

Since jQuery.GoogleMaps plugin is available from CDN you can even instantiate it on your page with resources from jsdelivr CDN

@Html.GoogleMapEditor("test", new Mvc.GoogleMaps.Models.Map()
           {
               editMode = true,
               stylesPath = "//cdn.jsdelivr.net/jquery.googlemaps/2.2.4/styles.json",
               markerPinsPath = "//cdn.jsdelivr.net/jquery.googlemaps/2.2.4/img",
               editTemplatesPath = "//cdn.jsdelivr.net/jquery.googlemaps/2.2.4/html"
           })

About

HtmlHelper for using JQuery.GoogleMaps plugin on ASP.NET MVC pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%