使用图像渲染Airbnb谷歌地图标记

时间:2018-01-07 21:23:46

标签: react-native

enter image description here

如何通过airbnb谷歌地图界面自定义我的标记以承载许多图像?如何在不使用故事地图的情况下将图像上传到谷歌地图?任何线索将不胜感激。

1 个答案:

答案 0 :(得分:0)

了解// Code goes here var myapp = angular.module('myapp', ["ngSanitize", "ngCsv"]); myapp.controller('myctrl', function($scope) { $scope.filename = "test"; $scope.getArray = [{ label: 'Apple', value: 2, x:1, }, { label: 'Pear', value: 4, x:38 }, { label: 'Watermelon', value: 4, x:38 }]; $scope.getHeader = function() { var vals = []; for( var key in $scope.getArray ) { for(var k in $scope.getArray[key]){ vals.push(k); } break; } return vals; }; });<!DOCTYPE html> <html> <head> <link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-sanitize.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ng-csv/0.3.6/ng-csv.min.js"></script> </head> <body> <div ng-app="myapp"> <div class="container" ng-controller="myctrl"> <div class="page-header"> <h1>ngCsv <small>example</small></h1> </div> <button class="btn btn-default" ng-csv="getArray" csv-header="getHeader()" filename="{{ filename }}.csv" field-separator="," decimal-separator=".">Export to CSV with header</button> </div> </div> </body> </html> API(取决于您的需要):

按照官方示例进行自定义:

如果您不喜欢阅读代码,请按照教程,例如:

https://codedaily.io/tutorials/9/Build-a-Map-with-Custom-Animated-Markers-and-Region-Focus-when-Content-is-Scrolled-in-React-Native

上面的tut并没有给你相同的结果,但它向你展示了如何自定义。