web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Parse address field into external Bing Maps API

(0) ShareShare
ReportReport
Posted on by

Hi, Im using the following api from Bing Maps to add aerialview map into my account entity for address field.

I am not sure as to how I can parse the address1_composite field into the following html code.

<!DOCTYPE html>
<html>
<head>
<title>birdseyeV2HTML</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
</head>
<body>
<div id='printoutPanel'></div>

<div id='myMap' style='width: 100vw; height: 100vh;'></div>
<script type='text/javascript'>
function loadMapScenario() {
var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
/* No need to set credentials if already passed in URL */
center: new Microsoft.Maps.Location(37.239027, -121.966237),
mapTypeId: Microsoft.Maps.MapTypeId.birdseye });
var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(37.239027, -121.966237), { title: 'sample text' });
var polyline = new Microsoft.Maps.Polyline([new Microsoft.Maps.Location(37.239279, -121.966286),
new Microsoft.Maps.Location(37.239481, -121.966162),
new Microsoft.Maps.Location(37.239622, -121.966179),
new Microsoft.Maps.Location(37.239881, -121.966654),
new Microsoft.Maps.Location(37.238978, -121.967443),
new Microsoft.Maps.Location(37.238807, -121.967427),
new Microsoft.Maps.Location(37.237538, -121.964750),
new Microsoft.Maps.Location(37.236868, -121.965635),
new Microsoft.Maps.Location(37.236001, -121.965812),
new Microsoft.Maps.Location(37.235905, -121.965091),
new Microsoft.Maps.Location(37.235577, -121.964664)], { strokeColor: 'lightblue', strokeThickness: 5 });
var layer = new Microsoft.Maps.Layer();
layer.add([pushpin, polyline]);
map.layers.insert(layer);

}
</script>
<script type='text/javascript' src='www.bing.com/.../mapcontrol;callback=loadMapScenario' async defer></script>
</body>
</html>

I am a rookie at crm backend. Please help.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Inogic Profile Picture
    682 on at

    Hi,

    You need to pass the address field to Bing Maps and Bing Maps will return latitude and longitude as a response. And using the latitude and longitude, you can plot in the bing map.

    You can refer the following two links for details.

     

    1)      http://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk#searchByAddress+JS

    2)      https://blogs.bing.com/maps/2013/07/19/address-and-location-capture-in-dynamics-crm-with-bing-maps/

    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans