I want to modify my asp.net application to open a google maps location from a hyperlink (https://maps.google.com/maps/ms? msid=217765347979644002223.00048600fdc1ccf2d2d55&msa=0). I need to retrieve the lat, and longitude from a db table I already have and dynamically input them into the link above. My goal is basically to have the user click on the link it, it retrieves the lat, long, from the table, and returns or opens the google maps link via web browser.
Maybe not exactly what you are looking for but this is a good article on how to create a mvc display template for spatial db type using google maps http://www.hanselman.com/blog/ASPNETMVCDisplayTemplateAndEditorTemplatesForEntityFrameworkDbGeographySpatialTypes.aspx
Related
I have a discord bot written in c# that reports events based on their latitude/longitude. I want to take the latitude/longitude data and place markers on an html based google map (locally hosted or online) using c#
Can someone point me in the right direction?
You'll want to use the Google Static Maps API.
I created an asp.net web page (C# .NET 4.5.1 web application) and added a google map to it that centers on the user's current location, adds a weather overlay, and all is working fine. As this is a solution for pilots I want to add their route for today. I have to query the database for today's routes and then put the KML data on the map. I'm not overly well versed in javascript or jquery as I'm learning this. I can create a method in the code behind that returns the KML and/or geocoords for today's route but I'm not sure how to get that to the google map.
If anyone could help in how to go about this I'd greatly appreciate it.
Thank you.
I ended up creating a .ashx script handler page that returns the KML and the URL to this page is set in the kml layer options. One note is that the location of this .ashx page has to allow anonymous access if your site is locked down to logged in users only.
Want to develop a query refinement tool just like Google Suggest so that i will get recommended options when i enter keywords in the search textbox i.e( if i type "car"
i will get the recommended options as rental cars,used cars,cars for sale etc) want to develop the tool in c#/ASP.Net dont know where to start.please give some suggestions.
This can be achieved by using javascript and let's say some web service / page method. You send the values that user gave you to a web service. The web service translates the text, make some database (or other storage) request and return the results to the page as json (or some other format that suits you).
Look at this article if you need some example code:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=515
By the way, if you need more articles, just put "asp.net autocomplete" into Google. That should give you plenty of resources.
I'm trying to create a C# application that downloads maps from some Maps Database (OpenStreetMap, Google Maps, Yahoo Maps)
And then to make an API that show me my location on the downloaded maps without being connected to the internet ...?
I found a lot of examples of google offline maps but i cant find something to show your location on downloaded maps using Longitude and Latitude.
As far as i know the GMap.Net control can use a local cache. So you could populate the cache with the tiles you like and afterwards simply change to cache-only mode.
If you look deeper into code it should also be possible to get some data in and out of the cache by some API. So you could download the tiles once and save them to disk. At startup you'll inject the tiles into the cache and set the mode from the beginning to cache-only.
We're trying to import a file from a C# dll into MapPoint, and can get it to read the data just fine, but we are having trouble with MapPoint not recognizing all of the addresses. Currently, our file contains not only address information, but latitude and longitude as well (under the headers of Lat and Lon). Is there any options we can set, or any methods we can use that will allow us to tell MapPoint to use the latitude and Longitude in place of, or in addition to the address? So far I've not found any, but I could be looking in the wrong place anyway. Thanks.
You should be able to locate Location objects by Latitude, Longitude coordinates, and to locate input data (eg. from Excel or Access) using Longitude,Latitude coordinates. How are you actually creating the data in MapPoint?
Richard
Map Point 2010 will allow you to enter a Location based on Longitude and Latitude. Are you using the Web Based Bing API or the Map Point application API? I am using this same functionality in one of my applications. If you are using the application API, the ShowFindDialog method will even throw up a pre-rolled window with search criteria for a location, and you can enter latitude and longitude there. See the MSDN article if you have detailed questions. http://msdn.microsoft.com/en-us/library/aa562422.aspx