0
How do you create a Google map with multiple locations?
Hi,
I want to integrate into my Ninox database a Google map to display multiple locations.
Has anyone been able to come up with a functional solution that could be shared here or at least give me some instructions?
Thanks
43 replies
-
Hi,
In the new version of the attached database, there is a marker on the map for each customer.
let x := (select Customers); html("<!doctype html> <html lang='en'> <head> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='chrome=1'> <meta name='viewport' content='initial-scale=1.0, user-scalable=no, width=device-width'> <style type='text/css'> body,html,#container{ width: 100%; height: 100%; margin: 0px } </style> <title>API加载</title> </head> <body> <div id='container' tabindex='0'></div> <script type='text/javascript'> window.init = function(){ var map = new AMap.Map('container', { resizeEnable: true, center:[116.480983, 39.989628], zoom:11 }); if (location.href.indexOf('guide=1') !== -1) { map.setStatus({scrollWheel: false}); map.plugin(['AMap.ToolBar'], function() { map.addControl(new AMap.ToolBar({liteStyle:true})) }); }; // 创建一个 Marker 实例: " + for loop in x do "var " + first(loop.Name) + " = new AMap.Marker({ position: new AMap.LngLat(" + longitude(first(loop.Location)) + ", " + latitude(first(loop.Location)) + "), });" end + " // 多个点实例组成的数组 var markerList = [" + text(x.Name) + "]; map.add(markerList); }; </script> <script src='https://webapi.amap.com/maps?v=1.4.15&key=您申请的key值&callback=init'></script> <script> </script> </body> </html>
-
said:
If labels can be displayed like this, it would be more convenient.Done! I like this version a lot
Content aside
- Status Answered
- 4 mths agoLast active
- 43Replies
- 940Views
-
5
Following