add shapes to bing maps from locations stored in a database (bing maps ajax control)
By : xingqiyi
Date : March 29 2020, 07:55 AM
wish of those help I don't know if this is the preferred way of doing it, but I would suggest that you load the coordinates from the database into hidden fields onto the page. In the JavaScript on the page you can create VELatLong coordinates for each pin/shape you want loaded on the map. Here I used jQuery to load the values. In the JavaScript code :
var latitude = $("#Latitude").val();
var longitude = $("#Longitude").val();
latLon = new VELatLong(latitude, longitude);
<input id="Longitude" name="Longitude" type="hidden" value="-80.98271369934085" />
<input id="Latitude" name="Latitude" type="hidden" value="43.371240452765925" />
|
Is there a solution for ios bing maps sdk for armv7s? Or should use bing ajax control v7 into a UIWebview?
By : laoli
Date : March 29 2020, 07:55 AM
This might help you Hi all I found out that it is working for iPhone 5 but it's performance is a bit shaky. I will add some more information if I have optimized the usage of bing maps ios sdk in iPhone 5.
|
How to acquire Bing Maps SessionId for non-billable Bing Rest service using the WinRT API
By : Alex Kaufman
Date : March 29 2020, 07:55 AM
With these it helps Find the solution: call the GetSessionIDAsync on the Map instance after initialization!
|
Any javascript adapter / wrapper library for web maps such as Google Maps and Yahoo Maps and Bing Maps?
By : vivi su
Date : March 29 2020, 07:55 AM
wish of those help There is one such api called Mapstraction. It allows one to develop for bing/Google/Yahoo with the same set of instructions. The disadvantage is that these map providers are not equal feature wise, and so there might be a gap between Mapstraction api and the native ones. But for simple things you shouldn't have a problem.
|
How can I use bing maps loaded from external cdn inside my vuejs application?
By : Elza
Date : March 29 2020, 07:55 AM
This might help you After a lot of troubles, I have understood. The Bing map api is loaded async way. So the Microsoft / Microsoft.Maps object are not directly available. I have decided to keep the solution 2 to load the script (this way the script is not globally loaded). I have tried to use the onload method on the injected script but with no success. The Bing Maps api has an option to call a callback function but the function must be global. This is my final working solution code :
<template>
<div id="map" ref="map"></div>
</template>
<script lang="ts">
// Vue
import { Vue, Component } from "vue-property-decorator";
@Component
export default class AppMap extends Vue {
mounted() {
if (document.getElementById("scriptBingMaps")) {
return; // already loaded
}
// Add a global function for the callback from Bing Maps api
(<any>window).OnLoadBingMapsApi = () => this.InitMap();
// Add programmaticaly the external Bing maps api script
var scriptTag = document.createElement("script");
scriptTag.src = "https://www.bing.com/api/maps/mapcontrol?callback=OnLoadBingMapsApi";
scriptTag.id = "scriptBingMaps";
// Inject the dynamic script in the DOM
document.head.appendChild(scriptTag);
}
private InitMap(): void {
let mapElement: HTMLElement = <HTMLElement>this.$refs.map;
var map = new Microsoft.Maps.Map(mapElement, {
credentials: [API_KEY]
});
}
}
</script>
<style lang="scss" scoped>
/* ==========================================================================
Map
========================================================================== */
#map {
height: 300px;
width: 500px;
}
</style>
|