Placing Circles instead of Markers in google maps

user3844966

I would like to add 2 circles(red and green) instead of the default marker on the google maps. I need the color of the circles to change(increase/decrease of intensity) based on the values in the database. Is it possible to do so?

Roman

Create a circle as a marker icon, for example:

var oMarker = new google.maps.Marker({
    position: latLng,
    sName: "Marker Name",
    map: map,
    icon: {
        path: google.maps.SymbolPath.CIRCLE,
        scale: 8.5,
        fillColor: "#F00",
        fillOpacity: 0.4,
        strokeWeight: 0.4
    },
});

and then, if you want to change the marker dynamically (like on mouseover), you can, for example:

oMarker.setIcon({
            path: google.maps.SymbolPath.CIRCLE,
            scale: 10,
            fillColor: "#0F0",
            fillOpacity: 0.8,
            strokeWeight: 1
        })

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Google maps clear all markers before placing new one

分類Dev

Fade In circles in Google Maps

分類Dev

Draw circles around multiple markers in Maps

分類Dev

ReactJS and Google Maps - Displaying Markers

分類Dev

Removing multiple circles google maps api

分類Dev

Google maps delete all markers and then create new

分類Dev

Google Maps: infobox turns up behind markers?

分類Dev

Google Maps fit markers in custom bounds

分類Dev

Google maps API markers content hide by default

分類Dev

Google Maps multiple maps displayed instead of one

分類Dev

How to hide/show groups of markers by category with Google Maps in Android?

分類Dev

Google Maps API 3 - Show All Markers on Screen, but Keep Centerpoint

分類Dev

How to get all markers in google-maps-react

分類Dev

How to Add Google Maps with Multiple Markers Showing Infowindows on Load and on Click

分類Dev

How to delete markers from my own google maps

分類Dev

Setting listeners to groups of markers using Google Maps API

分類Dev

Google Map API V3 - infowindows @ markers on 2 maps

分類Dev

Google Maps API 3 Load Markers from MySQL from current position

分類Dev

Get Markers Addresses in Input fields using Drag-able Google Maps API V3

分類Dev

Map markers not rendering - Google Maps Javascript API v3 In Phonegap

分類Dev

Adding Multiple Markers in real time google maps v2 android

分類Dev

How to manage Markers well using google maps api v2 on android

分類Dev

amCharts Maps not loading circles on page refresh

分類Dev

How to use the map from maps.google.ae (map for UAE) instead of map from maps.google.com

分類Dev

How to apply CSS to Here Maps API Markers

分類Dev

AngularJS Google Map with Multiple Markers

分類Dev

android maps api v2 adding multiple circles

分類Dev

TypeError:google.maps.Markersはコンストラクターではありません

分類Dev

Add markers to Google Map when navigate the map

Related 関連記事

  1. 1

    Google maps clear all markers before placing new one

  2. 2

    Fade In circles in Google Maps

  3. 3

    Draw circles around multiple markers in Maps

  4. 4

    ReactJS and Google Maps - Displaying Markers

  5. 5

    Removing multiple circles google maps api

  6. 6

    Google maps delete all markers and then create new

  7. 7

    Google Maps: infobox turns up behind markers?

  8. 8

    Google Maps fit markers in custom bounds

  9. 9

    Google maps API markers content hide by default

  10. 10

    Google Maps multiple maps displayed instead of one

  11. 11

    How to hide/show groups of markers by category with Google Maps in Android?

  12. 12

    Google Maps API 3 - Show All Markers on Screen, but Keep Centerpoint

  13. 13

    How to get all markers in google-maps-react

  14. 14

    How to Add Google Maps with Multiple Markers Showing Infowindows on Load and on Click

  15. 15

    How to delete markers from my own google maps

  16. 16

    Setting listeners to groups of markers using Google Maps API

  17. 17

    Google Map API V3 - infowindows @ markers on 2 maps

  18. 18

    Google Maps API 3 Load Markers from MySQL from current position

  19. 19

    Get Markers Addresses in Input fields using Drag-able Google Maps API V3

  20. 20

    Map markers not rendering - Google Maps Javascript API v3 In Phonegap

  21. 21

    Adding Multiple Markers in real time google maps v2 android

  22. 22

    How to manage Markers well using google maps api v2 on android

  23. 23

    amCharts Maps not loading circles on page refresh

  24. 24

    How to use the map from maps.google.ae (map for UAE) instead of map from maps.google.com

  25. 25

    How to apply CSS to Here Maps API Markers

  26. 26

    AngularJS Google Map with Multiple Markers

  27. 27

    android maps api v2 adding multiple circles

  28. 28

    TypeError:google.maps.Markersはコンストラクターではありません

  29. 29

    Add markers to Google Map when navigate the map

ホットタグ

アーカイブ