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
Related
I'm trying to set up a basic app to call the Google Directions API from a Xamarin.Forms app in Android. I'm new to Xamarin & C# generally, so have struggled searching for the right terms, but am familiar with the directions service from a javascript angle.
I'm using this basic app as a test bed: https://learn.microsoft.com/en-us/xamarin/android/platform/maps-and-location/maps/maps-api
I can add the button and associate a process with it, but how do i call the API & catch the results?
I'll worry about plotting etc later, i just want to write out the results to console for now.
Thanks for your help in advance!
1.First of all, you can used following URL to get Json data.(Please notice:You need to enable the Directions API in Google console,otherwise, you will get error message This API project is not authorized to use this API.)
https://maps.googleapis.com/maps/api/directions/json?origin=lat1,lon1&destination=lat2,lon2&key=yourApiKey
In this URL, you need to provide the latitude and longitude of Origin position and destination postion.API key(You can get the API key from a Google console)
2.You can play and just change variables in this link and open it in browser, to see the returning object like this screenshot.
3.When you receive the return object, you will need to parse it.(Prase json data:http://bsubramanyamraju.blogspot.com/2017/04/xamarinforms-consuming-rest-webserivce_17.html)
4.The distance will be at googleApiRouteObject.routes[0].legs[0].distance; There you will find a int representation in meeters, and string representation like 2km.
5.The waypoints will be coded in Polylines, you will need to parse them. You can find how to do that with code examples here: https://developers.google.com/maps/documentation/utilities/polylineutility
If you want to get the sample code, you can refer to this link.
https://agileapp.co/xamarin-forms-maps-polyline-route-highlighted-google-api
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
I'm making a simple http server and I want to add a world map feature, that displays client geo location.
I got two questions:
Is there a way to find out lat/lon of an IP address without using sites like ip2location.com?
How can I geographically display a point on an image(world map) with giving lat,lon as an input parameter? is there a formula for that?
Thanks!
Is there a way to find out lat/lon of an IP address without using sites like ip2location.com?
No, unless you create and host your own database.
How can I geographically display a point on an image(world map) with
giving lat,lon as an input parameter? is there a formula for that?
Both Google and Bing Maps provide such functionality. Here's an example with Google Maps which allows you to place markers on a map given their latitude and longitude.
UPDATE:
You could use a Mercator Projection to place a point given latitude and longitude. You may take a look at the following article which explains the technique.
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.
I dont have much experience with google apis at all , however I need to implement it and would appreciate if you could help me
I have to implement google places api(?) to get results form google places and all details associated with that place
For example if you type pizza London in google places search you'll get 10 places per page. What I need is get "link to that site" and xml(preferable) type of result with details about that place, such as address, contact, link to website, and payment options.
I dont know if something like this is even possible but if it is I would appreciate if you post an example of how it works
Thanks in advance
Basically you will need to register and get a key to use google places. Once you have the key you can access it like this ...
https://maps.googleapis.com/maps/api/place/search/xml?location=31.1556451,-93.7761955&radius=7500&sensor=false&key=enter-google-key-here&types=bar
which lists all bars within 7.5km of the place with latitude: 31.1556451 and longitude: -93.7761955
--- Additions in response to comment below ---
If you only have a place (like London) and not a latitude and longitude to go with it, you can try a two step process -- use google geocoding api to get the lat lon and then use that to search for pizza using the google places api.