How to scale google map marker when user click on it2019 Community Moderator ElectionGoogle Maps API v3: How do I dynamically change the marker icon?How to disable mouse scroll wheel scaling with Google Maps APIHow can I change the color of a Google Maps marker?Google Maps JS API v3 - Simple Multiple Marker ExampleSelecting last element in JavaScript arrayGoogle Maps Android API v2 - Interactive InfoWindow (like in original android google maps)Add marker to Google Map on ClickShow marker to Google Map on ClickHow to change Google Maps Marker icon when user clicked the marker iconHow to determine if markers are overlapping visually in Google Maps

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

New invention compresses matter to produce energy? or other items? (Short Story)

What's the best tool for cutting holes into duct work?

ESPP--any reason not to go all in?

Python 3.6+ function to ask for a multiple-choice answer

Can a space-faring robot still function over a billion years?

Is there a way to find out the age of climbing ropes?

Why is the electrolytic capacitor not polarity sensitive?

Does the in-code argument passing conventions used on PDP-11's have a name?

The past tense for the quoting particle って

If nine coins are tossed, what is the probability that the number of heads is even?

How do you make a gun that shoots melee weapons and/or swords?

Remove object from array based on array of some property of that object

Custom javascript not working

Is there a math expression equivalent to the conditional ternary operator?

Where do you go through passport control when transiting through another Schengen airport on your way out of the Schengen area?

Ultrafilters as a double dual

Does the US political system, in principle, allow for a no-party system?

Dukha vs legitimate need

Why aren't there more gauls like Obelix?

School performs periodic password audits. Is my password compromised?

Iron deposits mined from under the city

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

What does "rhumatis" mean?



How to scale google map marker when user click on it



2019 Community Moderator ElectionGoogle Maps API v3: How do I dynamically change the marker icon?How to disable mouse scroll wheel scaling with Google Maps APIHow can I change the color of a Google Maps marker?Google Maps JS API v3 - Simple Multiple Marker ExampleSelecting last element in JavaScript arrayGoogle Maps Android API v2 - Interactive InfoWindow (like in original android google maps)Add marker to Google Map on ClickShow marker to Google Map on ClickHow to change Google Maps Marker icon when user clicked the marker iconHow to determine if markers are overlapping visually in Google Maps










-2















I am trying to scale a custom marker when user click on it. I am using Google Map API and React Framework.



 let marker = new window.google.maps.Marker(
position:
lat: parseFloat(marker.marker_location.lat),
lng: parseFloat(marker.marker_location.lng)
,
icon: markerIcon,
scaledSize: new window.google.maps.Size(40, 40)
);

marker.addListener('click', function updateId()

marker.scaledSize.height = 60;
marker.scaledSize.width = 60;

);


When I console.log(marker.scaledSize.height) and console.log(marker.scaledSize.weight). I can see that the icon size has been changed to 60 not 40 in my console.log. But the marker size in the viewport hasn't been changed.










share|improve this question



















  • 1





    Post the minimal code necessary to reproduce the problem. This is not enough.

    – MrUpsidown
    yesterday






  • 1





    And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

    – MrUpsidown
    yesterday















-2















I am trying to scale a custom marker when user click on it. I am using Google Map API and React Framework.



 let marker = new window.google.maps.Marker(
position:
lat: parseFloat(marker.marker_location.lat),
lng: parseFloat(marker.marker_location.lng)
,
icon: markerIcon,
scaledSize: new window.google.maps.Size(40, 40)
);

marker.addListener('click', function updateId()

marker.scaledSize.height = 60;
marker.scaledSize.width = 60;

);


When I console.log(marker.scaledSize.height) and console.log(marker.scaledSize.weight). I can see that the icon size has been changed to 60 not 40 in my console.log. But the marker size in the viewport hasn't been changed.










share|improve this question



















  • 1





    Post the minimal code necessary to reproduce the problem. This is not enough.

    – MrUpsidown
    yesterday






  • 1





    And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

    – MrUpsidown
    yesterday













-2












-2








-2








I am trying to scale a custom marker when user click on it. I am using Google Map API and React Framework.



 let marker = new window.google.maps.Marker(
position:
lat: parseFloat(marker.marker_location.lat),
lng: parseFloat(marker.marker_location.lng)
,
icon: markerIcon,
scaledSize: new window.google.maps.Size(40, 40)
);

marker.addListener('click', function updateId()

marker.scaledSize.height = 60;
marker.scaledSize.width = 60;

);


When I console.log(marker.scaledSize.height) and console.log(marker.scaledSize.weight). I can see that the icon size has been changed to 60 not 40 in my console.log. But the marker size in the viewport hasn't been changed.










share|improve this question
















I am trying to scale a custom marker when user click on it. I am using Google Map API and React Framework.



 let marker = new window.google.maps.Marker(
position:
lat: parseFloat(marker.marker_location.lat),
lng: parseFloat(marker.marker_location.lng)
,
icon: markerIcon,
scaledSize: new window.google.maps.Size(40, 40)
);

marker.addListener('click', function updateId()

marker.scaledSize.height = 60;
marker.scaledSize.width = 60;

);


When I console.log(marker.scaledSize.height) and console.log(marker.scaledSize.weight). I can see that the icon size has been changed to 60 not 40 in my console.log. But the marker size in the viewport hasn't been changed.







reactjs google-maps






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







Code Ninja

















asked yesterday









Code NinjaCode Ninja

12




12







  • 1





    Post the minimal code necessary to reproduce the problem. This is not enough.

    – MrUpsidown
    yesterday






  • 1





    And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

    – MrUpsidown
    yesterday












  • 1





    Post the minimal code necessary to reproduce the problem. This is not enough.

    – MrUpsidown
    yesterday






  • 1





    And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

    – MrUpsidown
    yesterday







1




1





Post the minimal code necessary to reproduce the problem. This is not enough.

– MrUpsidown
yesterday





Post the minimal code necessary to reproduce the problem. This is not enough.

– MrUpsidown
yesterday




1




1





And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

– MrUpsidown
yesterday





And read the documentation. scaledSize is a property of google.maps.Icon which itself is a property of MarkerOptions interface. The Marker class has a setIcon method.

– MrUpsidown
yesterday












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55022516%2fhow-to-scale-google-map-marker-when-user-click-on-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55022516%2fhow-to-scale-google-map-marker-when-user-click-on-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко