Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpPost]
- public IActionResult Itinerary(string[] destination)
- {
- foreach (var item in destination)
- {
- _context.Itinerary.Add(item); // error: '"Argument 1: Cannot convert from 'string ' to NameSpace.Model.Itinerary"
- }
- _context.SaveChanges();
- return View();
- }
- function createMarkers(places) {
- var bounds = new google.maps.LatLngBounds();
- var placesList = document.getElementById('places');
- for (var i = 0, place; place = places[i]; i++) {
- var image = {
- url: place.icon,
- size: new google.maps.Size(71, 71),
- origin: new google.maps.Point(0, 0),
- anchor: new google.maps.Point(17, 34),
- scaledSize: new google.maps.Size(25, 25)
- };
- var marker = new google.maps.Marker({
- map: map,
- icon: image,
- title: place.name,
- animation: google.maps.Animation.DROP,
- position: place.geometry.location
- });
- var checkbox = document.createElement('input');
- checkbox.type = "checkbox";
- checkbox.name = "destination";
- checkbox.value = place.name;
- checkbox.id = "id";
- checkbox.setAttribute("asp-for","LocationName");
- var label = document.createElement('label')
- label.htmlFor = "id";
- label.appendChild(document.createTextNode(place.name));
- placesList.appendChild(label);
- placesList.appendChild(checkbox);
- <div multiple id="places" > </div>
- <button id="more">More results</button>
- <input type="submit" value="Finished"/>
Add Comment
Please, Sign In to add comment