google-maps-markers

Which map solution / package to use with Flutter Web?

吃可爱长大的小学妹 提交于 2019-12-04 12:34:48
I am porting over a flutter mobile project to flutter web and was curious which map package to use in place of: https://pub.dev/packages/google_maps_flutter I was able to get a workable solution, but it isn't pretty. Below is the implementation. If I get some time and a legit port doesn't come a long I will post an example repo. import 'dart:html'; import 'package:flutter_web/material.dart'; import 'package:lift_ai/base/screen_state.dart'; import 'package:lift_ai/feature/property_common/property_contract.dart'; import 'package:lift_ai/feature/property_common/property_presenter_impl.dart';

why setMap(null) is not working google maps api v3?

…衆ロ難τιáo~ 提交于 2019-12-04 11:26:15
问题 I am using google maps api 3.9 .In app user can add marker or delete marker.when user click on map an Infowindow will be displayed.in which user can enter name,lat,long and click the save image as follows: google.maps.event.addListener(map, 'click', function(event) { point = new google.maps.Marker({ position: event.latLng , map: map , icon: 'resource/image/mapIcons/point.png' , id: id , type:"point" }); type = point.type; newPoint = true; existingPoint = false; markerObj = this;

express.js not serving my image

佐手、 提交于 2019-12-04 10:35:46
I don't understand whats going wrong here. directory structure: app/server.js app/public/index.html app/public/js/main.js app/public/img/car.png server.js var fs = require('fs') ,express = require('express'), app = express.createServer(); app.use(express.static(__dirname + "/public")); app.get('/', function(req, res){ fs.readFile(__dirname + '/public/index.html', 'utf8', function(err, text){ res.send(text); }); }); app.listen(8080, function(){ console.log('Server listening on %d', app.address().port); }); main.js var marker = new google.maps.Marker({ map:map, position:coords, icon: 'img/car

Compute the distance between polyline (route) and marker in Google Maps API v3

你。 提交于 2019-12-04 10:01:34
Is there any convenient way to compute the direct (shortest) distance between Polyline (the route generated by Google Directions) and markers that are NOT situated on that polyline? The only way I found out is to cycle through Polyline.getPath() vertices manually to calculate the shortest distance but it seems to be a bit harsh: var path = routes[0].overview_path; for (var i = 0; i < data.points.length; i++) { var latLngA = new LatLng(data.points[i].lat, data.points[i].lng); var shortest_distance = null; for (var j = 0; j < path.length; j++) { var distance = google.maps.geometry.spherical

How to change marker color? Google Maps [duplicate]

戏子无情 提交于 2019-12-04 10:00:52
This question already has answers here : Javascript, Change google map marker color (9 answers) Closed 4 years ago . function createMarker(latlng, item) { var marker = new google.maps.Marker({ position: latlng, map: map }); This part of the code . On the website it appears as a standard marker, it suits us all but red. How do I change it to another color? https://yadi.sk/i/ZDONpfoijAjdZ You should use icon property. For example, var marker = new google.maps.Marker({ position: latlng, map: map, icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png' }); There are many colors available at

Draggable marker with Google Maps SDK for iOS

好久不见. 提交于 2019-12-04 09:07:25
问题 Has anybody figured out how to implement draggable markers with the new Google Maps SDK for iOS? The API does not provide it natively, yet. Feature request is already submitted. If I could get a hold of the underlying view of the GMSMarker, I could intercept the Touch events. Anybody tried this? 回答1: As of today, You don't need to use external classes, just make your markers "draggable" GMSMarker *myMarker = [[GMSMarker alloc] ...]; ... [myMarker setDraggable: YES]; // Use some kind of data

Android Google Map addMarker() very slow when adding 400 markers

 ̄綄美尐妖づ 提交于 2019-12-04 09:02:46
问题 Thank you for taking the time to read this. I published an app to the Google Play store about a month ago(08/29/14) and this wasn't a problem with the same amount of markers. This week, i've noticed when i went onto my app that loading the 400 markers to the map took about 10-20 seconds on my Galaxy S5 and that there is a small circle in the middle of the default map marker icons. Before this, the map loaded in less than a second. I haven't updated or changed my app. I'm guessing Google

Android google maps async task add markers

夙愿已清 提交于 2019-12-04 08:34:37
I have a map. I have a database of points. I want to display points from database in AsyncTask, so user can move around the map, when the points are being loaded. There's not much points (like 353 or etc), but I redraw them all when user gets closer (zoom) to the map with bigger markers. When this redraw occurs, app freezes like for a fraction of a second, but it's noticeable, so I thought AsyncTask would be the answer. However it's not working. And it's weird. I found a few questions here, but the problem there was mostly not calling the "publishProgress()" method, which is not my case. In

How to position the label inside the Marker in Google Map?

喜你入骨 提交于 2019-12-04 07:14:48
问题 As shown in the picture, my label '150' is strictly located at the center. But i would like to move up a little bit. Is this possible? Note that I am using markers clustering. So i have to use 'Markers' type (correct me if I am wrong) 回答1: See the documentation for the Icon anonymous object: labelOrigin Type: Point The origin of the label relative to the top-left corner of the icon image, if a label is supplied by the marker. By default, the origin is located in the center point of the image.

how to change marker image in a google map

风流意气都作罢 提交于 2019-12-04 07:11:03
问题 i'm showing 20 markers in the map from that i need to show 10 markers with one icon and other 10 markers want to show in other icon. markers myLatLng to myLatLng9 should have similar marker and markers myLatLngb to myLatLngb9 should have same marker. can u help me what to change so that i can differentiate the 2 markers and label also markers - myLatLng to myLatLng9 as A and myLatLngb to myLatLngb9 as B. js fiddle - https://jsfiddle.net/9yq8y1p2/4/ code <script> function initMap() { var