SHARE
TWEET

Untitled

a guest Feb 18th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [HttpPost]
  2.     public IActionResult Itinerary(string[] destination)
  3.     {
  4.         foreach (var item in destination)
  5.         {
  6.             _context.Itinerary.Add(item);  // error: '"Argument 1: Cannot convert from 'string ' to NameSpace.Model.Itinerary"
  7.         }
  8.  
  9.         _context.SaveChanges();
  10.         return View();
  11.     }
  12.    
  13. function createMarkers(places) {
  14.     var bounds = new google.maps.LatLngBounds();
  15.     var placesList = document.getElementById('places');
  16.     for (var i = 0, place; place = places[i]; i++) {
  17.         var image = {
  18.             url: place.icon,
  19.             size: new google.maps.Size(71, 71),
  20.             origin: new google.maps.Point(0, 0),
  21.             anchor: new google.maps.Point(17, 34),
  22.             scaledSize: new google.maps.Size(25, 25)
  23.         };
  24.         var marker = new google.maps.Marker({
  25.             map: map,
  26.             icon: image,
  27.             title: place.name,
  28.             animation: google.maps.Animation.DROP,
  29.             position: place.geometry.location
  30.         });
  31.  
  32.         var checkbox = document.createElement('input');
  33.         checkbox.type = "checkbox";
  34.         checkbox.name = "destination";
  35.         checkbox.value = place.name;
  36.         checkbox.id = "id";
  37.         checkbox.setAttribute("asp-for","LocationName");
  38.  
  39.  
  40.         var label = document.createElement('label')
  41.         label.htmlFor = "id";
  42.         label.appendChild(document.createTextNode(place.name));
  43.  
  44.  
  45.         placesList.appendChild(label);
  46.         placesList.appendChild(checkbox);
  47.    
  48. <div multiple id="places" > </div>
  49.     <button id="more">More results</button>
  50.  
  51. <input type="submit" value="Finished"/>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top