I have a KML Map Layer on google map which contains the Administrative boundaries of an administrative unit called "BLOCKS".Each Block has different ID. How can i get the ID of the Block if i get the Longitude and Latitude of the Location using my mobile?
That information is not currently accessible with KmlLayer. If you import your KML into Fusion Tables, you can query the table and determine which polygon a Lat/Lng point is in (using ST_INTERSECT with a small CIRCLE)
Another option would be to use a third party parser like geoxml3, but if your KML is complex, that will have performance issues.
Related
Is EPSG:3857 coordinates system compatibility with Azure Maps? I am working on some project which require a geoJson to be loaded over the Azure maps but its not able to identify the coordinates correctly. The same geoJson is producing desired output on the other map provider like qGIS and Ordenance Survey.
EPSG:3857 is used by the rendering engine under the hood for the map, but like most other web map SDKs, the data input needs to be in EPSG:4326. Note that the specification for GeoJSON requires coordinates to be in EPSG:4326. Using other coordinates would make the GeoJSON file invalid and not inline with the specification.
That said, the math library in Azure Maps does provide calculations for converting coordinates between EPSG:3857 (web Mercator) and EPSG:4326 (WGS 84).
https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.math?view=azure-maps-typescript-latest#mercatorPixelsToPositions_Pixel____number_
https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.math?view=azure-maps-typescript-latest#mercatorPositionsToPixels_Position____number_
I have a table of geocoded data in a DNN database: several columns of data plus latitude and longitude.
I want to create a Google Map and put markers on the map that correspond to the items in the data table.
I have a SQL data source set up, and can get the geocoded data into the razor script, produces tables, etc.
I can create the Google Map, and put markers on it appropriately, but only if the marker data is hard-coded into the javascript that creates the map.
Where I am having conceptual trouble is getting the geocoded data into a form where the javascript can use it. Can someone help me with that part?
Thanks.
I guess the core question is how you store your coordinates - whether you have each number in a field or joined. I would basically follow the example of the map in the default bootstrap 3 templates - here's a link, but I recommend that you install the default templates to see how it's built:
https://github.com/2sic/2sxc-content-bootstrap3/blob/master/_Location%20-%20Full%20Size%20Map.cshtml
The docs are not clear on this as they mention fov and viewport suggesting a portion of the entire spherical image.
Does the Google Street View API support retrieving the entire 360 degree equi-rectangular (lat/lon) image?
No, but you could download separate panorama tiles and pack them together of use a third party tool (ex: https://istreetview.com/) and get the entire 360 degree image.
Another option would be to code the above functionality by yourself by using Google StreetView Image API (https://developers.google.com/maps/documentation/streetview/intro). To be honest, I did not try this myself, but through the API you should be able to retrieve all parts of the image and then stitch it back into equirectangular panorama.
This might give you more info:
How to get the original panorama image by panoid in google street view?
EDIT: While searching a way to overcome the fact that Google StreetView app doesn;t work as marketed, I found another third party service able to retrieve photos https://gothru.co/
It is possible by making use of the FOV and heading options within the API.
Take particular note of the heading param.
https://maps.googleapis.com/maps/api/streetview?size=640x640&location=51.52551,-0.08853&fov=120&heading=0&key=YOUR_KEY
https://maps.googleapis.com/maps/api/streetview?size=640x640&location=51.52551,-0.08853&fov=120&heading=120&source=outdoor&key=YOUR_KEY
https://maps.googleapis.com/maps/api/streetview?size=640x640&location=51.52551,-0.08853&fov=120&heading=240&key=YOUR_KEY
By making these three separate API calls you will receive the 360 image sliced into three parts.
You can then use something like node blend to combine them and voila you have a 360 panoramic image!
I am using Arcgis WPF, I am wondering if I could load an image as the map in my application? If it is possible, could you please tell me how to achieve it?
Thanks.
You can use ImageServer for the imagery files, and if the image is an .jpeg or .png and is non georeferenced, then you can use ArcMap to make it a map service (tiled map service or dynamic map service) and then use that map service in your code. You can go to ArcGIS online forums for WPF for more information
Is it satellite imagery or just an image? What API are you using?
If it is just an image, you can use a Graphics Layer and add the image as a graphic. With this approach, you can give it whatever lat/lon makes sense for your spatial reference.
If you have satellite imagery, you want to add it as a Raster layer (ArcGIS for Desktop/Engine) or a Tiled Map Service (WPF/Silverlight APIs). If you are using the WPF API's (and not ArcGIS Engine) then this requires access to ArcGIS Server to publish a map service.
I recommend reading through the API documentation as it is well documented.
We have a property/accommodation profile page that lists a property address including postcode. This information is stored in a SQL Server database table and the page has a recordset that allows us to feed profile information onto a page depending on the propertyID that is selected (either via link or using a form) by the user.
We created a field in the database table that would allow us to insert the Google Map embed code for a property and, subsequently, we'd then call that on the property profile page but this requires us to create the embed code in Google Maps first, have to paste that into our database field etc, before it would display a map on our page.
So...we would like to database drive the map based on the postcode. Is that possible?
We really don't want to have to get into longitude/latitude coordinates, we just want the map to identify the postcode and put a place marker on a map where that postcode appears.
How do we acheive this? We've tried looking through the documentation and help files, but we really don't know what we're asking for so finding answers is proving incredibly difficult or the answers that we've found seem extremely technical (Google API, Geocoding, etc) for what we're trying to acheive.
Could someone point us in the right direction?
We hoped that there would be some way of inserting the postcode, dynamically, into generic embed code from Google Maps and that Google Maps would do the rest.
Anyway, we would appreciate any help and advice that could be offered. Thank you.
Regards
NJ
Traditionally Postcode data in the UK costs lots of money.
You can now download the Ordnance Survey data and convert their data into Latitude and longitude which would let you plot coordinates on google maps. (http://www.ordnancesurvey.co.uk/oswebsite/products/code-point-open/index.html)