Skip to content

Commit

Permalink
Update javascript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Dec 29, 2024
1 parent 817096d commit a215793
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions googlemap_20241226/blockly/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ Blockly.JavaScript['googlemap_initial'] = function (block) {
' mapMarkers[i][3].setContent(newContent);\n'+
' }\n'+
' else if (type === "latitude") {\n'+
' mapMarkers[i][4].lat = newContent;\n'+
' mapMarkers[i][4].lat = Number(newContent);\n'+
' mapMarkers[i][2].position = mapMarkers[i][4];\n'+
' }\n'+
' else if (type === "longitude") {\n'+
' mapMarkers[i][4].lng = newContent;\n'+
' mapMarkers[i][4].lng = Number(newContent);\n'+
' mapMarkers[i][2].position = mapMarkers[i][4];\n'+
' }\n'+
' else if (type === "position") {\n'+
Expand Down Expand Up @@ -116,10 +116,10 @@ Blockly.JavaScript['googlemap_initial'] = function (block) {
' }\n'+
'}\n'+
'function zoomMap(pMapId, zoom) {\n'+
' pMapId.setZoom(zoom);\n'+
' pMapId.setZoom(Number(zoom));\n'+
'}\n'+
'function centerMap(pMapId, lat, lng) {\n'+
' const newCenter = new google.maps.LatLng(lat, lng);\n'+
' const newCenter = new google.maps.LatLng(Number(lat), Number(lng));\n'+
' pMapId.setCenter(newCenter);\n'+
'}\n'+
'window.addMapPoint = addMapPoint;\n'+
Expand Down

0 comments on commit a215793

Please sign in to comment.