bing-maps

Bing Maps in React JS - Component doesn't Load when props change

跟風遠走 提交于 2020-01-03 05:50:15
问题 I am trying to show bing maps on my React Application using props. The Maps are properly displayed on load but when the props change it will not reload the map component. I know the issue is componentDidMount() will be called only once when the component loads but I am not sure how to resolve it. interface IState { addresses: Array<PropertyDetails>; } interface PropertyDetails { fullAddress: string; propertyNumber: number } export class Map extends React.Component<{ data }, IState> {

Add Bing Map Autosuggest API to multiple fields in a form

你。 提交于 2020-01-03 02:57:06
问题 I wish to add the Bing Maps Autosuggest API to two fields in my form. When I execute the code, the autosuggest API works just for one field and not the other. Below is what I got so far : <script type='text/javascript'> function loadMapScenario() { Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', { callback: onLoad, errorCallback: onError }); function onLoad() { var options = { maxResults: 8 }; var manager = new Microsoft.Maps.AutosuggestManager(options); manager.attachAutosuggest('

Map Highlight Odd/Even Side of Street

烂漫一生 提交于 2020-01-02 17:33:06
问题 I have two coordinates of a street. Either both Odd or Even. So for example 15 ABC Street and 77 ABC Street (with their reverse geocode). I'm trying to draw a path line that is near the sidewalk. I used google maps api and did not find a way to do it. The directions api draws a line in the middle of the road, and I cannot find a way to do a geometric translation to either side of the street. I don't mind using any other API as long as I can solve the problem. 来源: https://stackoverflow.com

SqlGeography.STIntersection() returns even when I know there is no intersection

一世执手 提交于 2020-01-02 14:04:15
问题 A little about the application; The application allows the user to draw and save polygons onto bing maps WPF api. The piece of code we are interested in is finding weather a point is whithin the polygon or not. The following function simply loops through the LocationCollection of the polygon on the bing map, and creates a SqlGeography object (OpenGisGeographyType.Polygon) which is an instance of a polygon. We then convert the mouse click into SqlGeography object (OpenGisGeographyType.Point)

Calculating the driving distance between two points using PHP only (Bing maps)

独自空忆成欢 提交于 2020-01-01 21:37:09
问题 I'd like to work out the distance between two points. No map. No javascript. Just the distance. I understand Google maps prohibits this and it's against their terms of service. But Bing Maps doesn't have this restriction. I want to give the points in a general format, i.e "Cambridge" "Church Street, Newcastle" How would I go about doing it? As basic as possible. It's for a mobile device. 回答1: 1.) Sign up for a Bing Maps key at http://www.bingmapsportal.com. A key is a alphanumeric string of

Get height of a building from a maps API

筅森魡賤 提交于 2020-01-01 09:07:05
问题 It's any public maps API (google, microsoft, openstreet...) that returns the height of the roof for certain points? Imagine: you request some address and the API returns the coordinates, some information and the height of the building, if available. 回答1: OpenStreetMap has a height tag and various other building related tags like building:levels from which you could estimate the height. However note that currently most buildings lack those tags as they aren't widely in use so far. Still you

Restrict the min/max zoom on a Bing Map with v7 of the AJAX control?

本小妞迷上赌 提交于 2019-12-30 04:24:24
问题 I'm working on a site that makes use of v7 of the Bing Maps AJAX Control. One of the things I need to do is restrict the zoom level so as to prevent users from zoom in past a certain level, or zoom out past a certain level. I found a "getZoomRange" method on the Map object, after inspecting it, it simply returns an object literal with "min" and "max" properties. So, I figured overloading it would probably do the trick: // "map" is our Bing Maps object map.getZoomRange = function () { return {

How to tell if a line intersects a polygon in C#?

假如想象 提交于 2019-12-30 03:13:04
问题 I have a question very similar to this: How to know if a line intersects a plane in C#? I am searching for a method (in C#) that tells if a line is intersecting an arbitrary polygon. I think the algorithm by Chris Marasti-Georg was very helpful, but missing the most important method, i.e. line to line intersection. Does anyone know of a line intersection method to complete Chris Marasti-Georg's code or have anything similar? Is there a built-in code for this in C#? This method is for use with

how can I bind Bing Pushpins from multiple models?

穿精又带淫゛_ 提交于 2019-12-25 12:44:17
问题 I have the requirement in my WP7 application to display pushpins on a bing map from multiple data sources and I am not sure of the best way to do this. So for example it would be something like this, I receive from a web service a list of people, a list of buildings, a list of POIs etc. I would need to display these individually in their own views but also display them on a map with different images for each type. I am trying to use a MVVM approach so have a class for a Person, class for a

Track a user draw polyline snap to roads bing maps

无人久伴 提交于 2019-12-25 09:40:22
问题 Was wondering if anyone has any experience or could help with the logic, to track a user (car) with Bing maps As the user travels a line should be drawn of their journey, but snap to roads, the way I have things set at the moment, lines will be drawn through buildings. Because whenever there is an update to the position, 2 points are calculated and a line is added to the map (At the moment am using watchPosition but in future will get position every 30 seconds) watchPos() { let options = {